Islands Text Client v0.1.48 Islands.TextClient View Source

Text client for the Game of Islands.

Inspired by the book Functional Web Development by Lance Halvorsen.
Also inspired by the course Elixir for Programmers by Dave Thomas.

Link to this section Summary

Functions

Lets player2 join a game

Lets player1 start a game

Link to this section Functions

Link to this function join(game_name, player2_name) View Source
join(String.t(), String.t()) :: no_return()

Lets player2 join a game.

Player2 runs in a node with any short name (here client2)…

  • cd islands_text_client
  • iex --sname client2 -S mix

Player2 (Eve) joins game Eden from her node like so:

  • Islands.TextClient.join("Eden", "Eve")
Link to this function start(game_name, player1_name) View Source
start(String.t(), String.t()) :: no_return()

Lets player1 start a game.

App islands_engine must run in node with short name islands

  • cd islands_engine
  • iex --sname islands -S mix
  • :observer.start() # optional

Player1 runs in a node with any short name (here client1)…

  • cd islands_text_client
  • iex --sname client1 -S mix

Player1 (Adam) starts a game (Eden) from his node like so:

  • Islands.TextClient.start("Eden", "Adam")