penguins
1.0.0
|
Holds the data of the players of the Game.
You shouldn't create instances of this struct yourself, they are allocated by game_set_players_count.
Data Fields | |
short | id |
The unique ID, usually (but not necessarily) is just index + 1 . More... | |
char * | name |
Use game_set_player_name to set this. More... | |
int | points |
The score of the player, i.e. the number of collected fish. More... | |
int | penguins_count |
The length of the penguins array. More... | |
Coords * | penguins |
The list of the positions of all of the player's penguins. More... | |
int | moves_count |
The number of moves (penguin placements and movements) made by the player. More... | |
int | color |
The color of the penguins, currently used only in the TUI. More... | |
short Player::id |
The unique ID, usually (but not necessarily) is just index + 1
.
Definition at line 70 of file game.h.
Referenced by BotState::bot_rate_move(), BotState::bot_rate_placement(), Game::game_compute_state_hash(), Game::game_set_players_count(), CanvasPanel::get_selected_penguin_coords(), load_game_state(), Game::move_penguin(), Game::place_penguin(), save_game_state(), setup_test_game(), Game::undo_move_penguin(), and PlayerMovementController::update_tile_attributes().
char* Player::name |
Use game_set_player_name to set this.
Definition at line 72 of file game.h.
Referenced by Game::game_clone(), Game::game_set_player_name(), Game::game_set_players_count(), print_player_stats(), and save_game_state().
int Player::points |
The score of the player, i.e. the number of collected fish.
Definition at line 74 of file game.h.
Referenced by Game::game_compute_state_hash(), Game::game_set_players_count(), GameEndDialog::GameEndDialog(), load_game_state(), Game::move_penguin(), Game::place_penguin(), print_player_stats(), save_game_state(), Game::undo_move_penguin(), Game::undo_place_penguin(), and PlayerInfoBox::update_data().
int Player::penguins_count |
The length of the penguins array.
Definition at line 76 of file game.h.
Referenced by Game::any_valid_player_move_exists(), BotState::bot_compute_move(), Game::game_add_player_penguin(), Game::game_compute_state_hash(), Game::game_find_player_penguin(), Game::game_remove_player_penguin(), Game::game_set_penguins_per_player(), Game::game_set_players_count(), load_game_state(), and Game::placement_switch_player().
Coords* Player::penguins |
The list of the positions of all of the player's penguins.
Definition at line 79 of file game.h.
Referenced by Game::any_valid_player_move_exists(), BotState::bot_compute_move(), Game::game_add_player_penguin(), Game::game_clone(), Game::game_compute_state_hash(), Game::game_find_player_penguin(), Game::game_remove_player_penguin(), Game::game_set_penguins_per_player(), and Game::game_set_players_count().
int Player::moves_count |
The number of moves (penguin placements and movements) made by the player.
Definition at line 81 of file game.h.
Referenced by Game::game_compute_state_hash(), Game::game_set_players_count(), GameEndDialog::GameEndDialog(), Game::move_penguin(), Game::place_penguin(), Game::undo_move_penguin(), and Game::undo_place_penguin().
int Player::color |
The color of the penguins, currently used only in the TUI.
Definition at line 83 of file game.h.
Referenced by display_new_turn_message(), Game::game_set_players_count(), print_board(), print_player_stats(), and run_interactive_mode().