示例#1
0
	List<Command> AI.spawn(int resources){
		List<Command> commands = new List<Command> ();
		while (resources > unitData[3].getCost()) {
			Command spawnc = new Command();
			spawnc.addSpawn (3);
			commands.Add (spawnc);
			resources -= unitData[3].getCost();
		}
		return commands;
	}
示例#2
0
	List<Command> AI.spawn(int resources){
		List<Command> commands = new List<Command> ();
		int unitType = 2;
		while (resources > 0) {
			Command spawnc = new Command();
			spawnc.addSpawn (unitType);
			commands.Add (spawnc);
			resources -= unitData[unitType].getCost();
			unitType++;
			if(unitType >= 5){
				unitType = 2;
			}
		}
		return commands;
	}