@Override
	protected int getStateFromNeighbours(int currentState, int[] neighbours) 
	{		
		int deadNeighbours = countState(DEAD, neighbours);
		int humanNeighbours = countState(HUMAN, neighbours);
		int zombieNeighbours = countState(ZOMBIE, neighbours);
		
		if (currentState == DEAD)
		{
			if (humanNeighbours == 3)
				return HUMAN;
		}
		else if (currentState == HUMAN)
		{
			if (humanNeighbours < zombieNeighbours * LETHALITY)
			{
				return ZOMBIE;
			}			
			else if (8 - deadNeighbours > 4)
			{
				// Overcrowding
				return DEAD;
			}
			else if (humanNeighbours < 2)
			{
				// Loneliness
				return DEAD;
			}
		}
		else if (currentState == ZOMBIE)
		{
			if (humanNeighbours >= 5)
			{
				return DEAD;
			}
			else if (humanNeighbours == 0)
			{
				return DEAD;
			}
		}
		
		return currentState;		
	}