Spiders are amazing creatures, their ability to put traps to catch their prey is famous, but what happens when they try to hunt their own species? Let's create a scenario to see if we can trap a spider while being a spider!
Create a turn-based application where our spider will chase another spider.
We have 10 moves to catch our prey, if we fail, our spider dies.
On each turn we will control the spider and pass it a command that orders it where to move to, out of bound moves are not allowed as we should only move within the map.
The map should be printed at each turn so we can see how the game is developing.
/ - - O - O - O - O
/ | | | |
| / - O - O - O - O
| / | | | |
O - - O - O - O - O
| \ | | | |
| \ - O - O - O - O
\ | | | |
\ - - O - O - O - O