Eclipse913

TicTacToeRun.java

Oct 14th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.93 KB | None | 0 0
  1. public class TicTacToeRun {
  2.  
  3.     public static void main(String[] args) {
  4.         TicTacToe ticTacToe = new TicTacToe();
  5.         NeuralNetwork neuralNetwork = new NeuralNetwork();
  6.  
  7.         int totalWins = 0;
  8.         int totalGames = 1000000000;
  9.         for (int games = 1; games < totalGames; games++) {
  10.             System.out.println("This is game number: " + games + "\n");
  11.             ticTacToe.playGame();
  12.             totalWins = totalWins + ticTacToe.getTotalWins();
  13.         }
  14.         System.out.println("X won " + totalWins + " out of " + totalGames + " games");
  15.         /*//Sets all board state to 0
  16.         for (int row =0; row < ticTacToe.board.length; row++) {
  17.             for (int column = 0; column < ticTacToe.board[row].length; column++) {
  18.                 ticTacToe.board[row][column] = TicTacToe.BoardState.EMPTY;
  19.             }
  20.         }
  21.         neuralNetwork.runNetwork();*/
  22.         ticTacToe.printBoard();
  23.     }
  24. }
Add Comment
Please, Sign In to add comment