Skip to content

Commit

Permalink
Updated Player entity.
Browse files Browse the repository at this point in the history
  • Loading branch information
ingenthr committed Jul 24, 2011
1 parent 603fa64 commit 74a49f4
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/com/couchbase/demo/gamesim/Player.java
@@ -1,15 +1,23 @@
package com.couchbase.demo.gamesim;

import java.util.UUID;

/**
* This class represents a player in the game simulator.
* @author ingenthr
*/
public class Player {
private String playerName;
private String jsonType = "player";
private UUID uuid;
private String name;
private Integer hitpoints;
private int experience;
private int level;
private int loggedIn;

public Player(final String playerName) {
this.playerName = playerName;
this.name = playerName;
uuid = UUID.randomUUID();
}

public Player() {
Expand All @@ -32,7 +40,7 @@ public void feed(int level) {
}

String getName() {
return this.playerName;
return this.name;
}

private void setHitpoints(int i) {
Expand Down

0 comments on commit 74a49f4

Please sign in to comment.