Package pvzclone.model.impl
Class LevelImpl
java.lang.Object
pvzclone.model.impl.LevelImpl
- All Implemented Interfaces:
Level
Class that implements a Level.
-
Constructor Summary
ConstructorsConstructorDescriptionLevelImpl(int zombieCount, int zombieWaveCount, long sunSpawnRate, long zombieSpawnRate, long sunSpawnRateDecrementRange, long zombieSpawnRateDecrementRange) Constructor of the Level Implementation. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the sun spawn rate.longReturns the sun decrement spawn rate.intReturns the number of zombies in one level.intReturns the number of zombies in a wave in the level.longReturns the zombie spawn rate.longReturns the zombie decrement spawn rate.intReturns the number of zombie waves in one level.
-
Constructor Details
-
LevelImpl
public LevelImpl(int zombieCount, int zombieWaveCount, long sunSpawnRate, long zombieSpawnRate, long sunSpawnRateDecrementRange, long zombieSpawnRateDecrementRange) Constructor of the Level Implementation.- Parameters:
zombieCount- the number of zombieszombieWaveCount- the number of zombie wavessunSpawnRate- the spawn rate of the sunzombieSpawnRate- the spawn rate of the zombiesunSpawnRateDecrementRange- the inc/dec range for suns' s.r.zombieSpawnRateDecrementRange- the inc/dec range for zombies' s.r.
-
-
Method Details
-
getZombieCount
public int getZombieCount()Description copied from interface:LevelReturns the number of zombies in one level.- Specified by:
getZombieCountin interfaceLevel- Returns:
- the number of zombies in one level.
- See Also:
-
getZombieWaveCount
public int getZombieWaveCount()Description copied from interface:LevelReturns the number of zombie waves in one level.- Specified by:
getZombieWaveCountin interfaceLevel- Returns:
- the numbers of zombie waves in one level.
- See Also:
-
getZombieCountInWave
public int getZombieCountInWave()Description copied from interface:LevelReturns the number of zombies in a wave in the level. The value is based on the zombie count.- Specified by:
getZombieCountInWavein interfaceLevel- Returns:
- the number of zombies in a wave in the level.
- See Also:
-
getSunSpawnRate
public long getSunSpawnRate()Description copied from interface:LevelReturns the sun spawn rate.- Specified by:
getSunSpawnRatein interfaceLevel- Returns:
- the sun spawn rate.
- See Also:
-
getZombieSpawnRate
public long getZombieSpawnRate()Description copied from interface:LevelReturns the zombie spawn rate.- Specified by:
getZombieSpawnRatein interfaceLevel- Returns:
- the zombie spawn rate.
- See Also:
-
getSunSpawnRateDecrementRange
public long getSunSpawnRateDecrementRange()Description copied from interface:LevelReturns the sun decrement spawn rate.- Specified by:
getSunSpawnRateDecrementRangein interfaceLevel- Returns:
- the sun decrement spawn rate.
- See Also:
-
getZombieSpawnRateDecrementRange
public long getZombieSpawnRateDecrementRange()Description copied from interface:LevelReturns the zombie decrement spawn rate.- Specified by:
getZombieSpawnRateDecrementRangein interfaceLevel- Returns:
- the zombie decrement spawn rate.
- See Also:
-