Reversi implementation in Scala