From f61eb900879fe941460a284ff9e4681b0958b944 Mon Sep 17 00:00:00 2001 From: sicarius Date: Mon, 26 Feb 2007 21:25:01 +0000 Subject: SoccerTeam, Stuff from Magdeburg --- source/Concept/Framework/modules/logic/logic.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'source/Concept/Framework/modules/logic/logic.h') diff --git a/source/Concept/Framework/modules/logic/logic.h b/source/Concept/Framework/modules/logic/logic.h index ad8bad7..031e0b6 100755 --- a/source/Concept/Framework/modules/logic/logic.h +++ b/source/Concept/Framework/modules/logic/logic.h @@ -12,6 +12,8 @@ public: this->moduleId = 0; this->isKeeper = false; this->status = 0; + this->hasBall = false; + this->avoidsObstacle = false; } Logic(uint32 logicId) @@ -20,16 +22,29 @@ public: this->moduleId = logicId; this->isKeeper = false; this->status = 0; + this->hasBall = false; + this->avoidsObstacle = false; } protected: bool isKeeper; uint8 status; + bool hasBall; + bool avoidsObstacle; enum LogicalStatus { STATUS_KEEPER_TURN_RIGHT, STATUS_KEEPER_TURN_LEFT, + STATUS_KEEPER_RETURN_HOME, + STATUS_KEEPER_HUNT_BALL, + STATUS_KEEPER_TURN_TO_BALL, + STATUS_KEEPER_DRIVE_TO_DEFEND, + + STATUS_ATTACKER_TURN_TO_BALL, + STATUS_ATTACKER_DRIVE_TO_BALL, + STATUS_ATTACKER_SEARCHING_AT_HOME, + STATUS_ATTACKER_SEARCHING_AT_ENEMY, }; void OnBallOwned(); @@ -51,7 +66,8 @@ public: return !isKeeper; } - void SetKeeper(bool newStatus) { + void SetKeeper(bool newStatus) + { if(!this->isKeeper && newStatus) { this->OnBecomeKeeper(); @@ -65,8 +81,11 @@ public: bool HasBall() { - //fill me! + return this->hasBall; } + + void UpdateKeeperMovement(); + void UpdateAttackerMovement(); }; #endif -- cgit v1.2.3