Package playground
package playground
The package playground contains all level specific logic and control of level logic.
The structure and general logic (with global and local flags to be stored/used)
is provided in abstract base class
Child-classes implement specific logic for one level and game type (e.g.
Generally, the base class
Playground
.Child-classes implement specific logic for one level and game type (e.g.
SpaceInvadersLevel
).Generally, the base class
Playground
supports totally different game types to be implemented.-
ClassDescriptionextends
SpaceInvadersLevel
with a boring start messageextendsSpaceInvadersLevel
with a different startup message.extendsSpaceInvadersLevel
with a ZigZack move of the enemies inLevel3.createSingleEnemy(String, double, double, double, double, ObjectController, double)
and sets a differentLevel3.getStartupMessage()
.extendsSpaceInvadersLevel
with aliens that need two hits to be destroyed.Class that realizes all the game logic of a very simple game level.extendsSpaceInvadersLevel
with 10 enemies that need two shots each to be destroyed.Level that creates two RectObjects moving around and if ego is hit by them game is directly lost (lives = 0).This level adds two distracting objects to the canvas that cannot collide but bounce around all the time.extendsSpaceInvadersLevel
with a red box.Playground represents a level of the game, focusing on the game LOGIC, i.e., not so much on the graphical representation.Class that realizes all the game logic of a very simple game level.