wavelength 1.0.0
Loading...
Searching...
No Matches
capturedcondition.h
Go to the documentation of this file.
1#pragma once
2
4#include "game/triggermgr.h"
5
12public:
19 ~CapturedCondition() override = default;
20
28 bool Test() override {
29 const TriggerMgr &mgr = TheTriggerMgr;
30 return mgr.GetCapturer(mgr.GetTrack(mgr.GetPlayer())) == mgr.GetPlayer();
31 }
32};
The captured condition, which holds when the current player captured the track they play.
Definition capturedcondition.h:11
~CapturedCondition() override=default
Destroy the object.
bool Test() override
Test the condition.
Definition capturedcondition.h:28
A test a trigger makes before its actions start.
Definition triggercondition.h:11
Registry of the triggers that fire actions on game and display events.
Definition triggermgr.h:28
int GetCapturer(int nTrack) const
Report the player who captured a track.
Definition triggermgr.h:486
int GetTrack(int nPlayer) const
Report the track of a player.
Definition triggermgr.h:616
int GetPlayer() const
Definition triggermgr.h:451
TriggerMgr TheTriggerMgr
The trigger registry.