bwmodel
A modeling environment for Minecraft Bedwars
Loading...
Searching...
No Matches
Public Member Functions | List of all members
bwmodel::GameDelegate Class Referenceabstract

#include <gamedelegate.h>

Inheritance diagram for bwmodel::GameDelegate:
bwmodel::Model::v1

Public Member Functions

virtual void on_game_start (const Game &game)=0
 
virtual void on_players_match (const Game &game, PlayerColor victor, PlayerColor loser, bool was_final)=0
 
virtual void on_bed_broken (const Game &game, PlayerColor breaker, PlayerColor bed)=0
 
virtual void on_game_end (const Game &game)=0
 
virtual void tick (const Game &game)=0
 
virtual void on_player_move (const Game &game, int x, int y)
 
virtual void on_player_sight (const Game &game, PlayerColor spotted, RegionSet location)
 

Detailed Description

An interface for game events.

Member Function Documentation

◆ on_bed_broken()

virtual void bwmodel::GameDelegate::on_bed_broken ( const Game & game,
PlayerColor breaker,
PlayerColor bed )
pure virtual

Called when breaker has broken bed.

Implemented in bwmodel::Model::v1.

◆ on_game_end()

virtual void bwmodel::GameDelegate::on_game_end ( const Game & game)
pure virtual

Called when the game ends.

Implemented in bwmodel::Model::v1.

◆ on_game_start()

virtual void bwmodel::GameDelegate::on_game_start ( const Game & game)
pure virtual

Called when the game is initialized.

Implemented in bwmodel::Model::v1.

◆ on_player_move()

void bwmodel::GameDelegate::on_player_move ( const Game & game,
int x,
int y )
virtual

Called when the player position are updated.

◆ on_player_sight()

void bwmodel::GameDelegate::on_player_sight ( const Game & game,
PlayerColor spotted,
RegionSet location )
virtual

Called when the player sees player spotted at location.

◆ on_players_match()

virtual void bwmodel::GameDelegate::on_players_match ( const Game & game,
PlayerColor victor,
PlayerColor loser,
bool was_final )
pure virtual

Called when victor has defeated loser.

Implemented in bwmodel::Model::v1.

◆ tick()

virtual void bwmodel::GameDelegate::tick ( const Game & game)
pure virtual

Called repeatedly from after on_game_start until before on_game_end.

Implemented in bwmodel::Model::v1.


The documentation for this class was generated from the following files: