Islands.Client.Player (Islands Client Player v0.1.45)
View SourceModels a player in the Game of Islands.
Inspired by the course Elixir for Programmers by Dave Thomas.
Summary
Functions
Reacts to a game state, makes a move and repeats until the game is over.
Functions
@spec play(Islands.Client.State.t()) :: no_return()
Reacts to a game state, makes a move and repeats until the game is over.
Player1 reacts to game state:
:initializedby waiting for game state:players_set:players_setby waiting for game state:player1_turn:player2_turnby waiting for game state:player1_turnor:game_over:game_overby exiting the game
Player2 reacts to game state:
:players_setby waiting for game state:player2_turn:player1_turnby waiting for game state:player2_turnor:game_over:game_overby exiting the game