I am trying to write a java program to create a 19x19 board and then alternate between players until one has five in a row. I got all the methods but then got all tangled up trying to figure out where to call them. Can someone please take a look at this and help me figure out what I've done wrong? Thanks
Computer Science
Stuck on Java Gomoku .
I am trying to write a java program to create a 19x19 board and then alternate between players until one has five in a row. I got all the methods but then got all tangled up trying to figure out where to call them. Can someone please take a look at this and help me figure out what I've done wrong? Thanks
publice calss main {
import cs251.lab2.*;
public class Gomoku implements GomokuInterface {
public int getNumRows() {
return DEFAULT_NUM_ROWS;
}
public int getNumCols() {
return DEFAULT_NUM_COLS;
}
public int getNumInlineForWin() {
return SQUARES_IN_LINE_FOR_WIN;
}
public TurnResult handleClickAt(int row, int col) {
return Turnreslut.GAME_NOT_OVER;
}
public void initializeGame() {
}
public String getCurrentBoardAsString() {
return**;
}
public Square getCurrentTurn() {
return Square.RING;
}
public void setOppenentType(String type) {
}
public static void main(String[] args) {
Gomoku game = new Gomoku();
if(args.length > 0) {
game.setOpponentType(args[args]);
}
GomokuGul.showGUI(game);
}
}
}
Trending now
This is a popular solution!
Step by step
Solved in 2 steps