/*
    A game of tic-tac-toe in Java.

    Let's move quickly over difficult terrain.
*/

import java.io.*;

class TicTacToeGame {
    public static void main(String[] args) {
        System.out.println("Hello tic-tac-toe!");
    }
}
@@ -100,16 +100,36 @@
 va.io.*;
+%0Aimport java.util.*;
 %0A%0Aclass 
@@ -201,45 +201,1907 @@
     
-System.out.println(%22Hello tic-tac-toe
+Player player1 = new Player(%22Player 1%22, 'X');%0A        Player player2 = new Player(%22Player 2%22, 'O');%0A%0A        boolean playerStarts = humanPlayerStarts();%0A        if (playerStarts) %7B%0A            System.out.println(%22Player goes first.%22);%0A        %7D else %7B%0A            System.out.println(%22Machine goes first.%22);%0A        %7D%0A%0A        Board board = new Board(player1, player2);%0A        board.print();%0A%0A        while(true) %7B%0A            player1.makeMove(board);%0A            board.print();%0A            if (board.isWon()) %7B%0A                board.winMessage();%0A                break;%0A            %7D%0A%0A            player2.makeMove(board);%0A            board.print();%0A            if (board.isWon()) %7B%0A                board.winMessage();%0A                break;%0A            %7D%0A%0A            break;%0A        %7D%0A    %7D%0A%0A    private static boolean humanPlayerStarts() %7B%0A        Random rand = new Random(); %0A        int value = rand.nextInt(2);%0A%0A        if (value == 1) %7B%0A            return true;%0A        %7D else %7B%0A            return false;%0A        %7D%0A    %7D%0A%7D%0A%0Aclass Player %7B%0A    private String name;%0A    private char token;%0A    private boolean isHuman;%0A%0A    Player(String name, char token) %7B%0A        this.name = name;%0A        this.token = token;%0A        this.isHuman = true;%0A    %7D%0A%0A    public String getName() %7B%0A        return name;%0A    %7D%0A%0A    public char getToken() %7B%0A        return token;%0A    %7D%0A%0A    public void makeMove(Board board) %7B%0A        board.update(token, 0);%0A    %7D%0A%7D%0A%0Aclass Board %7B%0A    private Player player1;%0A    private Player player2;%0A%0A    Board(Player player1, Player player2) %7B%0A        this.player1 = player1;%0A        this.player2 = player2;%0A    %7D%0A%0A    public void update(char token, int move) %7B%0A%0A    %7D%0A%0A    public boolean isWon() %7B%0A        return true;%0A    %7D%0A%0A    public void print() %7B%0A        System.out.println(%22%5BBoard goes here%5D%22);%0A    %7D%0A%0A    public void winMessage() %7B%0A        System.out.println(%22Nobody wins
 !%22);

Add classes 'Player' and 'Board'