Besides the 'Moveables', which are simply moveable GridElements there is also the EndPointMoveable. It describes a moveable which can be lead from position to position Here an example of such an EndPointMoveable which is lead through a bounch of randomly placed moveable obstacles:
Note that the visualization of the detector can be turned off.
With the detector cluster, a special kind of a detector, a moveable can even navigate through a maze. A light-barrier at the end indicates that the moving GridElement has successfully reached the end of the maze: There are also elements like a tank or turret for less peacfull examples. The behaviour of a turret is defines by it's strategy. Like this it's possible to distinguish between human- and automated turrets. Thanks to a scanner, a turret can detect, acquire and shoot on enemy targets like obstacles or other tanks and turrets automatically. Evaluating the target position includes also evaluating a lead for moving targets. A turret has gun mounted - either has a bullet or a missile gun. The missile is a more intelligent type of a projectile which detect and follows the nearest detected target as soon as it's acquired. Since it's computing a lead for it's target, this usualy takes two cycles. A Tank comes with a 'TankEngine', a 'TankDetector' and a 'TankTurret'. The tank itselfs comes with a own tank-strategy which defines it's behaviour. Those mentioned tank elements can be replaced by different implementation using the builder pattern of the TankBuilder. In order to fight a missile, the tank-detector comes now with a 'MissileCounterMeasureSystem' which automatically detects missiles within a certain distance and automatically deploys a set of decoy flares. Those will lead the missile to change it's direction towards those decoy flares.Tank/turret example with rendering plain awt-shapes
Tank/turret example with images.
One of this strategy is a 'human' strategy which allows the user to control the turret by himself (the bunch of blue circles are deployed decoy flares):
- Continuous improvement of the collision detection system