Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tictactoe;
- import java.util.Scanner;
- public class MainActivity {
- public static void main(String[] args) {
- String player1Name;
- String player2Name;
- // Create new scanner object
- Scanner userInput = new Scanner(System.in);
- // Get player names
- System.out.print("Player 1 Name:\t");
- player1Name = (userInput.nextLine() + " ");
- System.out.print("Player 2 Name:\t");
- player2Name = userInput.nextLine();
- // Create the game board
- TicTacToeBoard gameBoard = new TicTacToeBoard(player1Name, player2Name);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement