Unbeatable tic tac toe in Scala