Need help with Tic Tac Toe assignment
I have to make a basic tic tac toe game for my class and I am stuck trying to get the board to print out and then I dont know if I am on the right track
public static void main(String[] args) {
String[][] board = new String[3][3];
for (int i = 0; i < 3; i++){
for (int j = 0; j < 3; j++){
int a = 0;
board[i][j] = "+";
System.out.println();
}
}
playerX(gameBoard1[i][j]);
playerO(gameboard2[i][j]);
}
public static void playerX(String[][] gameBoard1){
Scanner input = new Scanner(System.in);
System.out.println("Please pick a number you want to place an X:");
String pick = input.nextLine();
while (pick == gameboard1 [i][j]){
}
}
public static void playerO(String[][] gameBoard2){
Scanner input = new Scanner(System.in);
System.out.println("Please pick a number you want to place an O:");
String pick = input.nextLine();
while (pick == gameboard2 [i][j]){
}
}
public static void checkBoard(){
if(baord[0][0] = X && board[0][1] = X )
}
Re: Need help with Tic Tac Toe assignment
What do you expect your program to do? What does it do instead?
If you want help, post an SSCCE that demonstrates the problem, and don't forget the highlight tags.
Re: Need help with Tic Tac Toe assignment