The demo for this application can be found at ultimate-tictactoe.herokuapp.com.
The game mechanics are best described in the following blog post on Math With Bad Drawings. Whereas regular tic-tac-toe is a boring game that involves an inevitable stalemate, Ultimate Tic-Tac-Toe brings a little excitement to the world of tic-tac-toe and forces strategic thinking.
This is a sample project to demonstrate the integration between Play, Akka, and Scala.js.

The goal of this sample project is to demonstrate the usage of some key technologies and how they integrate and complement each other:
- Demonstrate concrete usage of advanced Akka features such as Akka FSM and how they can be leveraged to simplify the handling of state within message-driven systems.
- Leverage Scala.js to implement a reactive UI without resorting to complex JavaScript technologies like Angular or React. Scala.js integration was inspired by https://github.com/vmunier/play-with-scalajs-example.
- Kill the boredom of travel; coding is more fun than an in-flight entertainment system.
The following functionality is working.
-
The home page:
- Create a new game (by entering your first name)
- Join a game that has been created by someone else
-
The game page:
- Keeps track of total number of moves per player
- Keeps track of cumulative time of the turns for each player
- Win, loss, and tie game statistics
- Request a rematch
If you would like to contribute to this demo, please view the list of GitHub issues for ideas of functionality that would be nice to have.
The easiest way to get started is to download the Lightbend Activator, which bundles all dependencies for Scala, Play, Akka, and SBT together.
(Ignore the fact that the download artefact is called Typesafe Activator.)
https://www.lightbend.com/activator/download
You can also download the open-source projects separately by visiting each of their home pages.
Once you have downloaded the prerequisites above, you'll need to compile, test, and execute using SBT.
To run, simply type the following to compile:
sbt clean compile
Followed by:
sbt test
And finally:
sbt run
This will launch the server on port 9000
. In order to play a game, you can open two browser windows and point them to localhost:9000
.