very new any help appreciated

Overview

  • Tic Tac Toe clone.
  • Expandable grid size (by code).
  • 2 players (in future, an algorithm for a pc opponent).

Problem
I was struggling to think of a method for storing the information needed.
Current assumption of information needed to be stored:

  • (x, y) coordinates
  • bool for if a cell is empty (and so is free for a player choice)
  • store which player has a cell

Maybe I am approaching this completely wrong? or is there some way to create a solution with the current idea. Many thanks, sorry if it’s confusing, I am happy to explain further in replies if I have missed important details.

to store data use variables. An easy approach is by making a table:

int[,] table = new int[3, 3];

In each “cell” of the table you know that 0 is free, 1 - player1, 2 - player2

2 Likes

Thanks a lot, that helps