Package pvzclone.model.impl
Class LevelImpl
java.lang.Object
pvzclone.model.impl.LevelImpl
- All Implemented Interfaces:
Level
Class that implements a Level.
-
Constructor Summary
ConstructorDescriptionLevelImpl
(int zombieCount, int zombieWaveCount, long sunSpawnRate, long zombieSpawnRate, long sunSpawnRateDecrementRange, long zombieSpawnRateDecrementRange) Constructor of the Level Implementation. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the sun spawn rate.long
Returns the sun decrement spawn rate.int
Returns the number of zombies in one level.int
Returns the number of zombies in a wave in the level.long
Returns the zombie spawn rate.long
Returns the zombie decrement spawn rate.int
Returns 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:Level
Returns the number of zombies in one level.- Specified by:
getZombieCount
in interfaceLevel
- Returns:
- the number of zombies in one level.
- See Also:
-
getZombieWaveCount
public int getZombieWaveCount()Description copied from interface:Level
Returns the number of zombie waves in one level.- Specified by:
getZombieWaveCount
in interfaceLevel
- Returns:
- the numbers of zombie waves in one level.
- See Also:
-
getZombieCountInWave
public int getZombieCountInWave()Description copied from interface:Level
Returns the number of zombies in a wave in the level. The value is based on the zombie count.- Specified by:
getZombieCountInWave
in interfaceLevel
- Returns:
- the number of zombies in a wave in the level.
- See Also:
-
getSunSpawnRate
public long getSunSpawnRate()Description copied from interface:Level
Returns the sun spawn rate.- Specified by:
getSunSpawnRate
in interfaceLevel
- Returns:
- the sun spawn rate.
- See Also:
-
getZombieSpawnRate
public long getZombieSpawnRate()Description copied from interface:Level
Returns the zombie spawn rate.- Specified by:
getZombieSpawnRate
in interfaceLevel
- Returns:
- the zombie spawn rate.
- See Also:
-
getSunSpawnRateDecrementRange
public long getSunSpawnRateDecrementRange()Description copied from interface:Level
Returns the sun decrement spawn rate.- Specified by:
getSunSpawnRateDecrementRange
in interfaceLevel
- Returns:
- the sun decrement spawn rate.
- See Also:
-
getZombieSpawnRateDecrementRange
public long getZombieSpawnRateDecrementRange()Description copied from interface:Level
Returns the zombie decrement spawn rate.- Specified by:
getZombieSpawnRateDecrementRange
in interfaceLevel
- Returns:
- the zombie decrement spawn rate.
- See Also:
-