1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
package me.robbyzambito.othello import me.robbyzambito.othello.game.Game import scala.annotation.tailrec object Main extends App { val game = Game() @tailrec def gameLoop(game: Game): Unit = { if (game.winner.isEmpty) { gameLoop(game.takeTurn) } else { println(game.winnerMessage) } } gameLoop(game) }