Skip to content

Commit

Permalink
Added new player default hitpoints and level.
Browse files Browse the repository at this point in the history
  • Loading branch information
ingenthr committed Jul 26, 2011
1 parent 2e2b3b6 commit 8f0a272
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/com/couchbase/demo/gamesim/Player.java
Expand Up @@ -2,6 +2,8 @@

import java.util.UUID;

import com.sun.faban.driver.util.Random;

/**
* This class represents a player in the game simulator.
* @author ingenthr
Expand All @@ -14,10 +16,13 @@ public class Player {
private int experience;
private int level;
private boolean loggedIn;
private final Random random = new Random();

public Player(String playerName) {
this.name = playerName;
name = playerName;
uuid = UUID.randomUUID();
hitpoints = random.random(70, 150);
level = random.random(1, 5);
}

public Player() {
Expand Down

0 comments on commit 8f0a272

Please sign in to comment.