This repository has been archived by the owner on Dec 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Contains a trivial move instruction for now, will make that stuff better Soon:tm:
- Loading branch information
1 parent
71ca510
commit 81b46d4
Showing
10 changed files
with
63 additions
and
96 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "AIEngine.hpp" | ||
|
||
#include "CreatureController.hpp" | ||
#include "genesis/Context.hpp" | ||
#include "genesis/core/game/World.hpp" | ||
|
||
namespace genesis { | ||
|
||
void AIEngine::simulateColony(CreatureController& cc, World& world) { | ||
auto entities = cc.activeColonyEntities; | ||
|
||
for (auto& [groupId, group] : entities) { | ||
if (groupId == 0) { | ||
for (auto& entity : group.getEntities()) { | ||
entity->getPosition().x += 1; | ||
} | ||
} | ||
} | ||
|
||
} | ||
|
||
void AIEngine::tick(CreatureController& cc, World& world) { | ||
simulateColony(cc, world); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
namespace genesis { | ||
|
||
class World; | ||
class CreatureController; | ||
class AIEngine { | ||
private: | ||
void simulateColony(CreatureController& cc, World& world); | ||
public: | ||
void tick(CreatureController& cc, World& world); | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters