View Source Perudex.NotifierServer behaviour (Perudex v0.6.0)

This module is a GenServer to handle communication going to the players by defining an interface a module need to implements.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Link to this section Callbacks

Link to this callback

illegal_move(callback_arg, player_id)

View Source
@callback illegal_move(GameServer.callback_arg(), Game.player_id()) :: any()
Link to this callback

invalid_bid(callback_arg, player_id)

View Source
@callback invalid_bid(GameServer.callback_arg(), Game.player_id()) :: any()
Link to this callback

last_move( callback_arg, player_id, player_id, last_move )

View Source
@callback last_move(
  GameServer.callback_arg(),
  Game.player_id(),
  Game.player_id(),
  Game.last_move()
) :: any()
Link to this callback

loser(callback_arg, player_id, player_id)

View Source
@callback loser(GameServer.callback_arg(), Game.player_id(), Game.player_id()) :: any()
Link to this callback

move(callback_arg, player_id, t)

View Source
@callback move(GameServer.callback_arg(), Game.player_id(), Hand.t()) :: any()
Link to this callback

new_hand(callback_arg, player_id, t)

View Source
@callback new_hand(GameServer.callback_arg(), Game.player_id(), Hand.t()) :: any()
Link to this callback

reveal_players_hands( callback_arg, player_id, list, {} )

View Source
@callback reveal_players_hands(
  GameServer.callback_arg(),
  Game.player_id(),
  [{Game.player_id(), Perudex.Hand.t()}],
  {integer(), integer()}
) :: any()
Link to this callback

start_game(callback_arg, player_id, list)

View Source
@callback start_game(GameServer.callback_arg(), Game.player_id(), [Game.player_id()]) ::
  any()
Link to this callback

unauthorized_move(callback_arg, player_id)

View Source
@callback unauthorized_move(GameServer.callback_arg(), Game.player_id()) :: any()
Link to this callback

winner(callback_arg, player_id, player_id)

View Source
@callback winner(GameServer.callback_arg(), Game.player_id(), Game.player_id()) :: any()

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

publish(game_id, player_id, instruction)

View Source
@spec publish(any(), any(), Game.player_instruction()) :: :ok