Skip to content

Commit 0502644

Browse files
committed
Updated Template.java
1 parent 867ef47 commit 0502644

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/connect4/connectFour/Grid.java

-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ public interface Grid
7373
* If this Grid is not yet a finished game, this returns PLAYEREMPTY
7474
*/
7575
public int getWinningPlayer();
76-
77-
public boolean makeMove(int col);
7876

7977
public void undo();
8078
}

src/connect4/contestants/Template.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44

55
public class Template implements Player {
66

7-
// hard-coded to start in the middle, and only go through the decision tree if it can't put it in the middle
7+
/**
8+
* You should write your logic here
9+
*
10+
* @param g the game grid
11+
* @return a 0-indexed to drop a piece in
12+
*/
813
public int getMoveColumn(Grid g) {
914
while(true){
1015
int i = (int) (g.getCols() * Math.random());
@@ -14,6 +19,9 @@ public int getMoveColumn(Grid g) {
1419
}
1520

1621

22+
/**
23+
* @return Your bot's (or your) name
24+
*/
1725
public String getPlayerName() {
1826
return "Template";
1927
}

0 commit comments

Comments
 (0)