Update project

This commit is contained in:
Minh Bui
2020-01-07 13:14:23 -07:00
commit fc3ec3660c
17 changed files with 2476 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
package model;
/**
* The class implements a random strategy for connect4 game.
*/
import model.Connect4Model;
import java.util.Random;
public class RandomAI implements ComputerPlayer {
public int getMove(Connect4Model gameModel, boolean max) {
Random randomGenerator = new Random();
return randomGenerator.nextInt(gameModel.getMaxRow());
}
}