Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //(c) A+ Computer Science
- //www.apluscompsci.com
- //Name -
- import java.util.Scanner;
- public class TicTacToe2D
- {
- private String[][] mat;
- //Reads the String game into the 2D array, mat
- public TicTacToe2D(String game)
- {
- }
- //returns the winner and how they won or cat's game
- public String getWinner()
- {
- return "";
- }
- //returns a String representing the tic tac toe board visually
- public String toString()
- {
- String output="";
- return output+"\n\n";
- }
- public static void main(String[] args){
- TicTacToe2D game = new TicTacToe2D("XXXOOXXOO");
- System.out.println( game );
- System.out.println( game.getWinner() );
- game = new TicTacToe2D("OXOOXOXOX");
- System.out.println( game );
- System.out.println( game.getWinner() );
- game = new TicTacToe2D("OXOXXOXOO");
- System.out.println( game );
- System.out.println( game.getWinner() );
- game = new TicTacToe2D("OXXOXOXOO");
- System.out.println( game );
- System.out.println( game.getWinner() );
- game = new TicTacToe2D("XOXOOOXXO");
- System.out.println( game );
- System.out.println( game.getWinner() );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement