|
Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
|
Definition of the aspect class representing a player playing the Game of Ur locally. More...
#include <ur_player_local.hpp>
Public Member Functions | |
| std::shared_ptr< BaseSimObjectAspect > | clone () const override |
Static Public Member Functions | |
| static std::string | getSimObjectAspectTypeName () |
| static std::shared_ptr< BaseSimObjectAspect > | create (const nlohmann::json &jsonAspectProperties) |
Public Attributes | |
| ToyMaker::SignalObserver< GamePhaseData > | mObserveMovePrompted |
| Observer of prompt move events generated by the game's UrController. | |
| ToyMaker::SignalObserver< PieceTypeID, glm::u8vec2 > | mObservePieceLaunchAttempted |
| Observer of the launch piece event generated by the game's UI layer. | |
| ToyMaker::SignalObserver< PieceIdentity > | mObserveMovePieceAttempted |
| Observer of the move piece event, generated by the game's 3D scene layer. | |
| ToyMaker::SignalObserver | mObserveEndTurnAttempted |
| Observer of the end turn event, generated by the game's UI layer. | |
| ToyMaker::SignalObserver | mObserveDiceRollAttempted |
| Observerr of the dice roll event, generated by the game's UI layer. | |
| ToyMaker::Signal< PlayerID > | mSigControlInterface {*this, "ControlInterface"} |
| Signal emitted when this player has been prompted for an action, and should take control of the UI and 3D scene of the game. | |
Private Member Functions | |
| void | onActivated () override |
| Prompts UrController to create and hand over controls that this player can then use to interact with (the data model of) the game. | |
| void | onLaunchPieceAttempted (PieceTypeID pieceType, glm::u8vec2 location) |
| Attempts to launch a game piece to some location. | |
| void | onNextTurnAttempted () |
| Attempts to advance the game by a turn, ending the current turn. | |
| void | onDiceRollAttempted () |
| Attempts to roll the dice. | |
| void | onMoveBoardPieceAttempted (PieceIdentity piece) |
| Attempts to move a piece situated somewhere on the board to a new location based on the current dice state. | |
| void | onMovePrompted (GamePhaseData phaseData) |
| Callback issued by UrController when this player is required to take action. | |
Private Attributes | |
| std::string | mControllerPath {} |
| The path to the UrController in this scene, from which this aspect will receive its game controls. | |
| std::unique_ptr< UrPlayerControls > | mControls {} |
| The controls returned by UrController, used to interact with the game data model. | |
Definition of the aspect class representing a player playing the Game of Ur locally.
This player uses this application's UI and input system to interact with the game data model.
|
private |
Attempts to launch a game piece to some location.
| pieceType | The type of piece being launched. |
| location | The location to which the piece should be launched. |
|
private |
Attempts to move a piece situated somewhere on the board to a new location based on the current dice state.
| piece | The piece to be moved. |
|
private |
Callback issued by UrController when this player is required to take action.
| phaseData | The current phase of the game. |
| ToyMaker::SignalObserver PlayerLocal::mObserveDiceRollAttempted |
Observerr of the dice roll event, generated by the game's UI layer.
| ToyMaker::SignalObserver PlayerLocal::mObserveEndTurnAttempted |
Observer of the end turn event, generated by the game's UI layer.
| ToyMaker::SignalObserver<PieceIdentity> PlayerLocal::mObserveMovePieceAttempted |
Observer of the move piece event, generated by the game's 3D scene layer.
| ToyMaker::SignalObserver<GamePhaseData> PlayerLocal::mObserveMovePrompted |
Observer of prompt move events generated by the game's UrController.
| ToyMaker::SignalObserver<PieceTypeID, glm::u8vec2> PlayerLocal::mObservePieceLaunchAttempted |
Observer of the launch piece event generated by the game's UI layer.