TicTacToe 7x7

You can purchase my source code for TicTacToe here:

  Buy now

 You will get full Java Source and you can modify the board size to 3x3, 5x5 or 7x7 as simple as change variable:
N=3, M=3
N=5, M=4
N=7, M=5
N=9, M=5

If you want to purchase please use promo code ALGOJAVA50 to get 50% discount.

Thank you for supporting AlgoJava.


  1. This comment has been removed by the author.

  2. Replies
    1. Hi Cornelius, yes it's using AI.
      You play the game with Computer.

    2. I've bought the product here, but why when 7x7 board up AI becomes weak? With setting m = 5

    3. Yes, because the strong AI only optimized for small board size. For the larger board, it uses heuristic move and allows human to win the game.