Various code updates

Increased flexibility of the code by isolating several functions into
toolbox functions (i.e. the one to create a random move, and the one to
play a given move), and updated the mechanism to cross check between
the player’s moves and the winning set so that it now outputs the
progress towards any of the 8 sets.