2d8b1e53ce
Final fix for end of movement
...
I was being dumb again : if we are adjacent to a target entity, stop moving
2019-06-10 21:53:39 +02:00
e1f23f67a2
Fixed oscillating around end position
2019-06-10 19:14:43 +02:00
5ccd7d0c13
Fixed movement of multiple entities.
...
Changed std::unique_ptr<Entity> to std::shared_ptr<Entity>.
Fixed pathfinding away from targets
TODO :
- Fix oscillation around destination
- Fix fleeing from adjacent target
- Win conditions
- GUI
2019-06-10 18:46:37 +02:00
293a564a29
Fixed Rule::findTarget() not finding good or even valid targets
2019-06-10 16:04:12 +02:00
c94fc5a0be
Rules are not template anymore (it was dumb)
...
Entities are now managed with unique_ptr to allow polymorphism (and good memory management)
Rules can be added via the Level object
Fixed Rule::findTarget not caring about targetType
TODO : Find why pathfinding (unlikely) or findTarget (most likely) is broken
2019-06-10 04:04:03 +02:00
4ab83f1124
Fixed pathfinding for usage with Rule::findTarget()
...
Fixed Entity::target being public
2019-06-10 01:58:14 +02:00
08e922b0d4
First implementation of rules
...
TODO :
- Fix target as getter (currently broken because of inheritance by rules)
- Smart pointers for entity store ?
2019-06-09 23:26:46 +02:00