Converted tictactoe template to use Javascript case switch