Some questions, confirm or oprovergnite my guesses
Posted: Sat Aug 01, 2009 8:38 pm
it is true that the bots could save the local variables between calls method think?
The Hacker's Home
https://www.hacker.org/f3/
Code: Select all
public class Elephant{
private int[] built = new int[4];
public Object think(...
...
public int build(...) {
if (buildItem != 0) return 0;
int unit = 1 + r.nextInt(3);
if (built[unit] >= 42) return 0; // never build more than 42 of any unit type
built[unit]++;
return unit;
}