View Source Perudex.NotifierServer behaviour (Perudex v0.7.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
@callback illegal_move(Perudex.GameServer.callback_arg(), Perudex.Game.player_id()) :: any()
@callback invalid_bid(Perudex.GameServer.callback_arg(), Perudex.Game.player_id()) :: any()
@callback last_move( Perudex.GameServer.callback_arg(), Perudex.Game.player_id(), Perudex.Game.player_id(), Perudex.Game.move_result() ) :: any()
@callback loser( Perudex.GameServer.callback_arg(), Perudex.Game.player_id(), Perudex.Game.player_id() ) :: any()
@callback move( Perudex.GameServer.callback_arg(), Perudex.Game.player_id(), Perudex.Hand.t() ) :: any()
@callback new_hand( Perudex.GameServer.callback_arg(), Perudex.Game.player_id(), Perudex.Hand.t() ) :: any()
@callback phase_change( Perudex.GameServer.callback_arg(), Perudex.Game.player_id(), Perudex.Game.game_phase() ) :: any()
@callback reveal_players_hands( Perudex.GameServer.callback_arg(), Perudex.Game.player_id(), [{Perudex.Game.player_id(), Perudex.Hand.t()}], {integer(), integer()} ) :: any()
@callback start_game(Perudex.GameServer.callback_arg(), Perudex.Game.player_id(), [ Perudex.Game.player_id() ]) :: any()
@callback unauthorized_move(Perudex.GameServer.callback_arg(), Perudex.Game.player_id()) :: any()
@callback winner( Perudex.GameServer.callback_arg(), Perudex.Game.player_id(), Perudex.Game.player_id() ) :: any()
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec publish(any(), any(), Perudex.Game.player_instruction()) :: :ok