gcode-mirror / ai-contest

Automatically exported from code.google.com/p/ai-contest
0 stars 1 forks source link

IssueOrder should NOT accept negative numbers #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This bot works :

std::vector<Planet> mine = pw.MyPlanets();
std::vector<Planet> neutral = pw.NeutralPlanets();

pw.IssueOrder(mine[0].PlanetID(), neutral[0].PlanetID(), -100);

Each turn, I have more 100 ships. :)

Original issue reported on code.google.com by Maxim...@gmail.com on 21 Aug 2010 at 1:39

GoogleCodeExporter commented 9 years ago
Aha. Ugh. Damn.

I will fix this asap.

Original comment by cameron.jp@gmail.com on 22 Aug 2010 at 1:15

GoogleCodeExporter commented 9 years ago
I added some if statements to guard against this case in both the client and 
server engine. Now when someone tries to send negative ships, they get booted 
from the game.

Thanks for finding this Maxime. I hate to think what kind of mayhem would have 
happened if this issue was discovered after launch. Would this have made the 
game trivially solvable in some way?

Original comment by cameron.jp@gmail.com on 29 Aug 2010 at 9:55