public void createLion(int x, int y) { if (fields[x, y].animal == null) { Lion tempLion = new Lion(this, x, y); animalList.Add(tempLion); fields[x, y].animal = tempLion; } }
public void createLion() { var field = getAvailableField(); Lion tempLion = new Lion(this, posX, posY); field.animal = tempLion; animalList.Add(tempLion); }