Free Prisoners Save

Prisoner's Dilemma game engine implemented using Cats Free Monad and Freestyle

Project README

Free Prisoners

An application built on top of Free Monad in Cats. It shows how Free can be used to create pure DSLs, side-effecting interpreters and how to use those things together.

The example implements a way to play Prisoner's Dilemma in several modes:

Running local games

  1. sbt "runMain com.michalplachta.freeprisoners.apps.HotSeatGame" - to run Hot Seat Game.
  2. sbt "runMain com.michalplachta.freeprisoners.apps.SinglePlayerGame" - to run Single Player Game.

Running Multiplayer Game with the Remote Server

RemoteServerInterpreter uses Akka Remoting (codename Artery).

To run Multiplayer Game you will need three separate sbt sessions:

  1. BIND_PORT=2552 sbt "runMain com.michalplachta.freeprisoners.apps.MultiplayerServer" - to run the server on specified server port,
  2. sbt "runMain com.michalplachta.freeprisoners.apps.MultiplayerGame" - to run the first player session,
  3. sbt "runMain com.michalplachta.freeprisoners.apps.MultiplayerGame" - to run the second player session.

See application.conf for more details about the configuration of all 3 actor systems.

Open Source Agenda is not affiliated with "Free Prisoners" Project. README Source: miciek/free-prisoners
Stars
38
Open Issues
0
Last Commit
6 years ago

Open Source Agenda Badge

Open Source Agenda Rating