Skip to content

Commit

Permalink
Added Player class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron committed Mar 28, 2016
1 parent 565cb52 commit 4a8bb69
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/model/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ public class Board {
public Board() {
representation = new Piece[BOARD_SIZE][BOARD_SIZE];
}

}
}
29 changes: 29 additions & 0 deletions src/model/Player.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package model;

import java.util.ArrayList;

public class Player {
private ArrayList<Piece> pieces;
private String name;

public Player(String name) {
this.name = name;
this.pieces = new ArrayList<Piece>();
}

public void addPiece(Piece p) {
pieces.add(p);
}

public ArrayList<Piece> getPieces() {
return pieces;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}

0 comments on commit 4a8bb69

Please sign in to comment.