Design a Tic-tac-toe game that is played between two players on a nx n grid. You may assume the following rules: A move is guaranteed to be valid and is placed on an empty block. Once a winning condition is reached, no more moves is allowed. A player…