I am currently making a tic tac toe game as one of my first projects in programming, and i am trying to figure out how to make it check when a player has won. In order to do this I came up with a value system in which each cell in the tictactoe board has a specific value and adding either an X or an O increases the value of the cell by one or -1 respectively. So my question is, how can I assign a different int value to each of the cells in the board? For example:
0 | 1 | 2
_______|_______|________
-1 | 0 | 1
_______|_______|________
-2 | -1 | 0
| |