Skip to content
Snippets Groups Projects
Commit 89ff38f4 authored by NGUYEN Thi hang's avatar NGUYEN Thi hang
Browse files

THN

parent dd702ad4
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ import java.util.List; ...@@ -13,7 +13,7 @@ import java.util.List;
import java.util.Random; import java.util.Random;
public class GameController { public class GameController {
public static final Color COLOR_ONE = Color.RED; public static final Color COLOR_ONE = Color.TAN;
public static final Color COLOR_TWO = Color.NAVAJOWHITE; public static final Color COLOR_TWO = Color.NAVAJOWHITE;
public static final Color COLOR_THREE = Color.GRAY; public static final Color COLOR_THREE = Color.GRAY;
public static final Color COLOR_FOUR = Color.GREEN; public static final Color COLOR_FOUR = Color.GREEN;
...@@ -160,7 +160,8 @@ public class GameController { ...@@ -160,7 +160,8 @@ public class GameController {
// TODO // TODO
// Player player = ... instantiate a ComputerPlayer named "cyclic" that follows the cyclic strategy // Player player = ... instantiate a ComputerPlayer named "cyclic" that follows the cyclic strategy
// game.setPlayer(player); // game.setPlayer(player);
Player player=new RobinStrategy() Player player= new ComputerPlayer("Robin", getGridStartCell(), new CyclicStrategy(availableColors));
game.setPlayer(player);
} }
@FXML @FXML
...@@ -168,6 +169,8 @@ public class GameController { ...@@ -168,6 +169,8 @@ public class GameController {
// TODO // TODO
// Player player = ... instantiate a ComputerPlayer named "walker" that follows the random walk strategy // Player player = ... instantiate a ComputerPlayer named "walker" that follows the random walk strategy
// game.setPlayer(player); // game.setPlayer(player);
Player player= new ComputerPlayer("walker",getGridStartCell(), new RandomWalk(availableColors, random));
game.setPlayer(player);
} }
@FXML @FXML
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment