| 
    penguins
    1.0.0
    
   | 
 
Go to the source code of this file.
Functions | |
| void | placement_begin (Game *game) | 
| Enters the GAME_PHASE_PLACEMENT phase, can only be called in GAME_PHASE_SETUP_DONE.  More... | |
| void | placement_end (Game *game) | 
| Exits the GAME_PHASE_PLACEMENT phase and switches to GAME_PHASE_SETUP_DONE.  More... | |
| int | placement_switch_player (Game *game) | 
| Performs the player switching logic for the placement phase.  More... | |
| bool | any_valid_placement_exists (const Game *game) | 
| bool | validate_placement_simple (const Game *game, Coords target) | 
| PlacementError | validate_placement (const Game *game, Coords target) | 
| void | place_penguin (Game *game, Coords target) | 
| Creates a GameLogPlacement entry. The requested placement must be valid.  More... | |
| void | undo_place_penguin (Game *game) | 
| Removes a GameLogPlacement entry from the log and undoes it.  More... | |
| void placement_begin | ( | Game * | game | ) | 
Enters the GAME_PHASE_PLACEMENT phase, can only be called in GAME_PHASE_SETUP_DONE.
Definition at line 11 of file placement.c.
| void placement_end | ( | Game * | game | ) | 
Exits the GAME_PHASE_PLACEMENT phase and switches to GAME_PHASE_SETUP_DONE.
Definition at line 20 of file placement.c.
| int placement_switch_player | ( | Game * | game | ) | 
Performs the player switching logic for the placement phase.
Finds the next player who can make a placement, switches Game::current_player_index to that player and returns their index. If there are no more valid placements, returns a PlacementError value, which are all negative numbers.
Definition at line 32 of file placement.c.
| bool any_valid_placement_exists | ( | const Game * | game | ) | 
Definition at line 51 of file placement.c.
Definition at line 64 of file placement.c.
Referenced by PlayerPlacementController::update_tile_attributes().
| PlacementError validate_placement | ( | const Game * | game, | 
| Coords | target | ||
| ) | 
Definition at line 70 of file placement.c.
Referenced by PlayerPlacementController::on_mouse_up(), and PlayerPlacementController::update_status_bar().
Creates a GameLogPlacement entry. The requested placement must be valid.
Definition at line 93 of file placement.c.
Referenced by BotPlacementThread::Entry(), and PlayerPlacementController::on_mouse_up().
| void undo_place_penguin | ( | Game * | game | ) | 
Removes a GameLogPlacement entry from the log and undoes it.
Definition at line 115 of file placement.c.