Implementation of the naughts and crosses game