siggame / MegaMinerAI-13

MegaMinerAI-13: Droids
1 stars 5 forks source link

Make Operate X and Y based #13

Closed KendallHarter closed 10 years ago

russleyshaw commented 10 years ago

I ran the codegen. The operate function now takes an X and Y value.

Can you modify the function to work with this.

russleyshaw commented 10 years ago
target = self.game.grid[x][y]

in the operate function will return a list. This list will contain at the very least a tile. It could potentially also contain a unit

target[0] will be the tile target[1] will be the unit

target.x does not exist target[0].x does.

KendallHarter commented 10 years ago

Updated code to reflect this, it should work now.