Refactored first tictactoe version by replacing 9 global variables with global array