Code for CodinGame (pseudo : Jarjar1er)
####Utilisation
world = get_world()
actions = [(Action.WAIT, None), (Action.FIRE, Coord(5, 9)] # list of tuples (action, target)
world.prepare()
world.set_actions(0, actions) # adds actions for the ennemy
world.set_actions(1, actions) # adds actions for you
world.update() # simulate the turn
- If a ship takes a mine, it's destroyed.
Do not hesitate to contact me (Je parle français !) to show a bug, sugest an optimisation, thanks me or just talk :D
This works with pygame, if you have troubles installing it, try this.
R
creates a new random worldRIGHT
makes actions (they're hardcoded) and updates this worldLEFT
goes back in the history of what you simulate. Yes, it's a time machine.