Skip to content

Commit

Permalink
game class no longer uses Player
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron committed Apr 20, 2016
1 parent 33938c8 commit d86040d
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/controller/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,14 @@

import model.Board;
import model.Color;
import model.Player;

public class Game {
private Board board;
private Player player_one, player_two;
private Color current_turn;

public Game(Player p1, Player p2) {
this.player_one = p1;
this.player_two = p2;
public Game(Color start) {
this.board = new Board();
assignPieces();
}

private void assignPieces() {
if (player_one.getAssignedColor() == Color.RED) {
player_one.setPieces(board.getRedPieces());
player_two.setPieces(board.getBlackPieces());
} else {
player_two.setPieces(board.getRedPieces());
player_one.setPieces(board.getBlackPieces());
}
current_turn = start;
}

}

0 comments on commit d86040d

Please sign in to comment.