Unbeatable Tic Tac Toe implemented in ruby