public class Game { public void play() { Board board = new Board(); Player p1 = new Player('R'); Player p2 = new Player('B'); while(!board.checkWin() && board.isFull() == false) { onePlay(p1, board); if(board.checkWin()) { break; } onePlay(p2, board); } System.out.println("Board is full or someone has won."); } public void onePlay(Player curplayer, Board b) { System.out.println("******************"); b.display(); System.out.println("******************"); int choice = curplayer.getPosition(); boolean success = b.placeChecker(choice, curplayer.getColor()); while(!success) { System.out.println("INVALID CHOICE OF POSITION"); choice = curplayer.getPosition(); success = b.placeChecker(choice, curplayer.getColor()); } } public static void main(String[] args) { Game g = new Game(); g.play(); } }