It is currently Tue Dec 11, 2018 9:25 pm Advanced search

changing ant orders midturn?

Questions and discussions about the current Ant Game Rules.

changing ant orders midturn?

Postby raver1975 » Thu Dec 15, 2011 7:54 pm

I scoured the documentation but couldn't find an answer to this question.

Can I give an ant new orders after I already outputted it's orders in the same turn?

Like if I told one ant to go west but changed my mind in the same turn, can I output new orders for it that override the old orders?

I know I could implement a test case to check for certain, but I'm checking here first to see if someone has a quick answer for me.

Posts: 5
Joined: Sat Oct 29, 2011 12:51 am

Re: changing ant orders midturn?

Postby ChrisH » Thu Dec 15, 2011 8:04 pm

I believe the second order for the same ant will get ignored and the game engine will log a message about duplicate orders on stderr if you are recording that.

If you need to support changing orders you will need to wait to submit the orders until you know they won't change.
Posts: 57
Joined: Tue Nov 30, 2010 8:54 pm

Re: changing ant orders midturn?

Postby McLeopold » Thu Dec 15, 2011 8:58 pm

That is correct.

You might consider a data structure to store orders, so that the second order updates the first. Then output everything during finish_turn. You'd have to be careful with timeout with this technique.
Contest Organizer
Posts: 262
Joined: Sun Sep 19, 2010 3:31 am

Return to Game Specifications

Who is online

Users browsing this forum: No registered users and 1 guest