Creating a playable tic tac toe game in R
This code creates a playable tic tac toe game in the R console. It can either be played with 1 or 2 players.
If being played with 1 player, then there is the option of having either the computer or person go first. The computer is programmed to first choose any winning move, and then choose any blocking move of a player win. If neither of these are available, they just choose the first available spot going across the rows from the top left to the bottom right.