Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void saveMove(String symbol, int[] move) {
- board[move[FIRST]][move[SECOND]] = symbol;
- // Checks to see if the user won
- if ((board[FIRST][FIRST].equals("[X]")
- && board[FIRST][SECOND].equals("[X]") && board[FIRST][THIRD]
- .equals("[X]"))
- || (board[SECOND][FIRST].equals("[X]")
- && board[SECOND][SECOND].equals("[X]") && board[SECOND][THIRD]
- .equals("[X]"))
- || (board[THIRD][FIRST].equals("[X]")
- && board[THIRD][SECOND].equals("[X]") && board[THIRD][THIRD]
- .equals("[X]"))
- || (board[FIRST][FIRST].equals("[X]")
- && board[SECOND][FIRST].equals("[X]") && board[THIRD][FIRST]
- .equals("[X]"))
- || (board[FIRST][SECOND].equals("[X]")
- && board[SECOND][SECOND].equals("[X]") && board[THIRD][SECOND]
- .equals("[X]"))
- || (board[FIRST][THIRD].equals("[X]")
- && board[SECOND][THIRD].equals("[X]")
- && board[THIRD][THIRD].equals("[X]")
- || (board[FIRST][FIRST].equals("[X]")
- && board[SECOND][SECOND].equals("[X]") && board[THIRD][THIRD]
- .equals("[X]")) || (board[FIRST][THIRD]
- .equals("[X]") && board[SECOND][SECOND].equals("[X]") && board[THIRD][FIRST]
- .equals("[X]")))) {
- person.setWinnerToTrue();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement