Ruby implementation of Tic-Tac-Toe