12#ifndef ZOAPPPLAYERCPURANDOM_H
13#define ZOAPPPLAYERCPURANDOM_H
17#include <toymaker/engine/sim_system.hpp>
26class PlayerCPURandom:
public ToyMaker::SimObjectAspect<PlayerCPURandom> {
28 PlayerCPURandom(): SimObjectAspect<PlayerCPURandom>{0} {}
29 inline static std::string getSimObjectAspectTypeName() {
return "UrPlayerCPURandom"; }
30 static std::shared_ptr<BaseSimObjectAspect> create(
const nlohmann::json& jsonAspectProperties);
31 std::shared_ptr<BaseSimObjectAspect> clone()
const override;
ToyMaker::SignalObserver< GamePhaseData > mObserveMovePrompted
The observer connected with this aspect, responsible for receiving and responding to move prompt even...
Definition ur_player_cpu_random.hpp:77
void onMovePrompted(GamePhaseData phaseData)
Callback for an event from GameOfUrController, prompting this player for a new game-related action.
Definition ur_player_cpu_random.cpp:25
std::random_device mRandomDevice
The device responsible for providing this class with random numbers.
Definition ur_player_cpu_random.hpp:52
void onActivated() override
Broadcasts its existence to UrController and receives in exchange an instance of UrPlayerControls.
Definition ur_player_cpu_random.cpp:16
std::default_random_engine mRandomEngine
An engine using the random device.
Definition ur_player_cpu_random.hpp:58
std::string mControllerPath
The path to the game controller this player interfaces with.
Definition ur_player_cpu_random.hpp:38
std::unique_ptr< UrPlayerControls > mControls
The controls object created by the game controller.
Definition ur_player_cpu_random.hpp:46
Data returned by GameOfUrModel when queried about the current phase of the game.
Definition model.hpp:112
Contains the class definition for UrController, the aspect responsible for managing and reporting the...