Coding challenge: Tic-tac-toe

This is a coding challenge to build a “computer player” which is able to play tic-tac-toe on a board varying from 3×3 to 10×10 in size. In order to win, the player has to put either “X” or “O” on any horizontal, vertical or diagonal line across the entire board.
I drew reference from this website for the basic structure of the code. On top of that, I designed a strategy for the computer player that can be implemented regardless of the board size.

Continue reading