summaryrefslogtreecommitdiffstats
path: root/source/Concept/Framework/modules/logic/logic.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Concept/Framework/modules/logic/logic.h')
-rwxr-xr-xsource/Concept/Framework/modules/logic/logic.h23
1 files changed, 21 insertions, 2 deletions
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