extends SpaceInvadersLevel with a ZigZack move of the enemies in
- Level3.createSingleEnemy(String, double, double, double, double, ObjectController, double) and
- sets a different Level3.getStartupMessage().
Description copied from class: controller.ObjectController
+
Is called once every game time step by the game itself. NEVER call this directly, not
+ necessary!
+ The method can do whatever it likes, including nothing. The attribute ObjectController.gameObject
+ contains a reference to the controlled object, which allows access to the Playground the object
+ belongs to (useful for getting the pixel size in x and y of the playing field.
+ Recommended: when implementing this method, call at the end
+ ObjectController.applySpeedVector() method. This is a helper method that sets the new x,y coordinates
+ for the ObjectController.gameObject correctly.
The controller package contains Object controllers that govern an objects behavior, without being
involved in its collision or drawing properties. Object controllers react to user actions/inputs
- and govern for example the movement of GameObject instances. They can access
+ and govern for example the movement of GameObject instances. They can access
their parent objects' properties and, by indirection, the properties and methods of the
associated level.
Controllers should be designed in such a way that they implement behavior that is
level-independent. All level-dependent behavior should be implemented in
- Playground.applyGameLogic().
@@ -96,10 +93,6 @@ Starting from the Overview page, you can browse the doc
Kinds of Pages
The following sections describe the different kinds of pages in this collection.
-
-
Overview
-
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
-
Package
Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
@@ -162,10 +155,6 @@ The following sections describe the different kinds of pages in this collection.
When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
applies the logic of the level: For now, this is just about deleting shots that are leaving the
- screen and calling methods 'actionIf..' in case objects collide.
Collision detection implemented by iteration through the own list of Collider
- and calling their Collider.collidesWith(Collider) method to check collision
- with the given parameter instance of other GameObject.
diff --git a/spaceinvaders/GameProject/doc/jquery-ui.overrides.css b/spaceinvaders/GameProject/doc/jquery-ui.overrides.css
index 1abff95..f89acb6 100644
--- a/spaceinvaders/GameProject/doc/jquery-ui.overrides.css
+++ b/spaceinvaders/GameProject/doc/jquery-ui.overrides.css
@@ -1,26 +1,26 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
*/
.ui-state-active,
diff --git a/spaceinvaders/GameProject/doc/member-search-index.js b/spaceinvaders/GameProject/doc/member-search-index.js
index c04a9e7..d62b223 100644
--- a/spaceinvaders/GameProject/doc/member-search-index.js
+++ b/spaceinvaders/GameProject/doc/member-search-index.js
@@ -1 +1 @@
-memberSearchIndex = [{"p":"ui","c":"GameUI","l":"ACTION_ABOUT"},{"p":"ui","c":"GameUI","l":"ACTION_BUTTON"},{"p":"ui","c":"GameUI","l":"ACTION_LOAD"},{"p":"ui","c":"GameUI","l":"ACTION_NEW"},{"p":"ui","c":"GameUI","l":"ACTION_PAUSE"},{"p":"ui","c":"GameUI","l":"ACTION_QUIT"},{"p":"ui","c":"GameUI","l":"ACTION_RESET"},{"p":"ui","c":"GameUI","l":"ACTION_SAVE"},{"p":"ui","c":"GameUI","l":"actionPerformed(ActionEvent)","u":"actionPerformed(java.awt.event.ActionEvent)"},{"p":"gameobjects","c":"GameObject","l":"addArtist(Artist)","u":"addArtist(rendering.Artist)"},{"p":"gameobjects","c":"GameObject","l":"addCollider(Collider)","u":"addCollider(collider.Collider)"},{"p":"gameobjects","c":"GameObject","l":"addController(ObjectController)","u":"addController(controller.ObjectController)"},{"p":"playground","c":"Playground","l":"addObject(GameObject)","u":"addObject(gameobjects.GameObject)"},{"p":"playground","c":"Playground","l":"addObjectNow(GameObject)","u":"addObjectNow(gameobjects.GameObject)"},{"p":"gameobjects","c":"AnimatedGameobject","l":"AnimatedGameobject(String, Playground, double, double, double, double, double, Animation, double, String)","u":"%3Cinit%3E(java.lang.String,playground.Playground,double,double,double,double,double,playground.Animation,double,java.lang.String)"},{"p":"playground","c":"Animation","l":"Animation(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"rendering","c":"AnimationArtist","l":"AnimationArtist(GameObject, Animation, double, String, double)","u":"%3Cinit%3E(gameobjects.GameObject,playground.Animation,double,java.lang.String,double)"},{"p":"playground","c":"Playground","l":"applyGameLogic()"},{"p":"playground","c":"SpaceInvadersLevel","l":"applyGameLogic()"},{"p":"controller","c":"ObjectController","l":"applySpeedVector()"},{"p":"collider","c":"CircleCollider","l":"checkCollisionCircCirc(Collider)","u":"checkCollisionCircCirc(collider.Collider)"},{"p":"collider","c":"RectCollider","l":"checkCollisionRectCirc(Collider)","u":"checkCollisionRectCirc(collider.Collider)"},{"p":"collider","c":"RectCollider","l":"checkCollisionRectRect(Collider)","u":"checkCollisionRectRect(collider.Collider)"},{"p":"rendering","c":"CircleArtist","l":"CircleArtist(GameObject)","u":"%3Cinit%3E(gameobjects.GameObject)"},{"p":"rendering","c":"CircleArtist","l":"CircleArtist(GameObject, double, Color)","u":"%3Cinit%3E(gameobjects.GameObject,double,java.awt.Color)"},{"p":"collider","c":"CircleCollider","l":"CircleCollider(String, GameObject, double)","u":"%3Cinit%3E(java.lang.String,gameobjects.GameObject,double)"},{"p":"playground","c":"HighscoreManager","l":"closeFile()"},{"p":"playground","c":"Playground","l":"collectObjects(String, boolean)","u":"collectObjects(java.lang.String,boolean)"},{"p":"collider","c":"Collider","l":"Collider(String, GameObject)","u":"%3Cinit%3E(java.lang.String,gameobjects.GameObject)"},{"p":"collider","c":"CircleCollider","l":"collidesWith(Collider)","u":"collidesWith(collider.Collider)"},{"p":"collider","c":"Collider","l":"collidesWith(Collider)","u":"collidesWith(collider.Collider)"},{"p":"collider","c":"RectCollider","l":"collidesWith(Collider)","u":"collidesWith(collider.Collider)"},{"p":"controller","c":"CollisionAwareEgoController","l":"CollisionAwareEgoController(double)","u":"%3Cinit%3E(double)"},{"p":"controller","c":"CollisionAwareEgoController","l":"CollisionAwareEgoController(double, File)","u":"%3Cinit%3E(double,java.io.File)"},{"p":"gameobjects","c":"GameObject","l":"collisionDetection(GameObject)","u":"collisionDetection(gameobjects.GameObject)"},{"p":"playground","c":"Playground","l":"deleteObject(String)","u":"deleteObject(java.lang.String)"},{"p":"playground","c":"Playground","l":"deleteObjectNow(String)","u":"deleteObjectNow(java.lang.String)"},{"p":"gameobjects","c":"GameObject","l":"draw(Graphics2D)","u":"draw(java.awt.Graphics2D)"},{"p":"rendering","c":"AnimationArtist","l":"draw(Graphics2D)","u":"draw(java.awt.Graphics2D)"},{"p":"rendering","c":"Artist","l":"draw(Graphics2D)","u":"draw(java.awt.Graphics2D)"},{"p":"rendering","c":"CircleArtist","l":"draw(Graphics2D)","u":"draw(java.awt.Graphics2D)"},{"p":"rendering","c":"RectArtist","l":"draw(Graphics2D)","u":"draw(java.awt.Graphics2D)"},{"p":"rendering","c":"TextArtist","l":"draw(Graphics2D)","u":"draw(java.awt.Graphics2D)"},{"p":"controller","c":"EgoController","l":"EgoController(double)","u":"%3Cinit%3E(double)"},{"p":"controller","c":"EgoController","l":"EgoController(double, double)","u":"%3Cinit%3E(double,double)"},{"p":"gameobjects","c":"EgoObject","l":"EgoObject(String, Playground, double, double, double, double, double)","u":"%3Cinit%3E(java.lang.String,playground.Playground,double,double,double,double,double)"},{"p":"playground","c":"SpaceInvadersLevel","l":"EGOSPEED"},{"p":"controller","c":"EnemyController","l":"EnemyController()","u":"%3Cinit%3E()"},{"p":"gameobjects","c":"FallingStar","l":"FallingStar(String, Playground, double, double, double, double, Color, double)","u":"%3Cinit%3E(java.lang.String,playground.Playground,double,double,double,double,java.awt.Color,double)"},{"p":"controller","c":"FallingStarController","l":"FallingStarController()","u":"%3Cinit%3E()"},{"p":"playground","c":"Animation","l":"fileList"},{"p":"playground","c":"Playground","l":"FLAGS_ALL"},{"p":"playground","c":"Playground","l":"FLAGS_GLOBAL"},{"p":"playground","c":"Playground","l":"FLAGS_LEVEL"},{"p":"base","c":"GameLoop","l":"GameLoop()","u":"%3Cinit%3E()"},{"p":"gameobjects","c":"GameObject","l":"GameObject(String, Playground, double, double, double, double)","u":"%3Cinit%3E(java.lang.String,playground.Playground,double,double,double,double)"},{"p":"gameobjects","c":"GameObject","l":"GameObject(String, Playground, ObjectController, double, double, double, double)","u":"%3Cinit%3E(java.lang.String,playground.Playground,controller.ObjectController,double,double,double,double)"},{"p":"playground","c":"Playground","l":"gameOver()"},{"p":"playground","c":"SpaceInvadersLevel","l":"gameOver()"},{"p":"ui","c":"GameUI","l":"GameUI(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"gameobjects","c":"AnimatedGameobject","l":"generateColliders()"},{"p":"gameobjects","c":"EgoObject","l":"generateColliders()"},{"p":"gameobjects","c":"GameObject","l":"generateColliders()"},{"p":"gameobjects","c":"RectObject","l":"generateColliders()"},{"p":"gameobjects","c":"TextObject","l":"generateColliders()"},{"p":"ui","c":"GameUI","l":"getCurrentKey()"},{"p":"playground","c":"Animation","l":"getFileList()"},{"p":"gameobjects","c":"GameObject","l":"getGameTime()"},{"p":"playground","c":"Playground","l":"getGameTime()"},{"p":"rendering","c":"Artist","l":"getGameTime()"},{"p":"playground","c":"Playground","l":"getGlobalFlag(String)","u":"getGlobalFlag(java.lang.String)"},{"p":"rendering","c":"AnimationArtist","l":"getH()"},{"p":"gameobjects","c":"RectObject","l":"getHeight()"},{"p":"collider","c":"Collider","l":"getId()"},{"p":"gameobjects","c":"GameObject","l":"getId()"},{"p":"playground","c":"Animation","l":"getImageList()"},{"p":"playground","c":"Playground","l":"getKeyEvents()"},{"p":"ui","c":"GameUI","l":"getKeyEvents()"},{"p":"playground","c":"Playground","l":"getLevelFlag(String)","u":"getLevelFlag(java.lang.String)"},{"p":"playground","c":"Playground","l":"getMouseEvents()"},{"p":"ui","c":"GameUI","l":"getMouseEvents()"},{"p":"ui","c":"GameUI","l":"getNewAction()"},{"p":"playground","c":"Playground","l":"getObject(String)","u":"getObject(java.lang.String)"},{"p":"gameobjects","c":"GameObject","l":"getObjectController()"},{"p":"gameobjects","c":"GameObject","l":"getObjectFlag(String)","u":"getObjectFlag(java.lang.String)"},{"p":"playground","c":"Playground","l":"getOrCreateGlobalFlag(String, Object)","u":"getOrCreateGlobalFlag(java.lang.String,java.lang.Object)"},{"p":"playground","c":"Playground","l":"getOrCreateLevelFlag(String, Object)","u":"getOrCreateLevelFlag(java.lang.String,java.lang.Object)"},{"p":"gameobjects","c":"GameObject","l":"getOrCreateObjectFlag(String, Object)","u":"getOrCreateObjectFlag(java.lang.String,java.lang.Object)"},{"p":"controller","c":"ObjectController","l":"getPlayground()"},{"p":"gameobjects","c":"GameObject","l":"getPlayground()"},{"p":"playground","c":"Animation","l":"getShowtimeList()"},{"p":"playground","c":"Playground","l":"getSizeX()"},{"p":"playground","c":"Playground","l":"getSizeY()"},{"p":"gameobjects","c":"TextObject","l":"getText()"},{"p":"rendering","c":"TextArtist","l":"getText()"},{"p":"rendering","c":"TextArtist","l":"getTextHeight()"},{"p":"rendering","c":"TextArtist","l":"getTextWidth()"},{"p":"controller","c":"ObjectController","l":"getTimestep()"},{"p":"playground","c":"Playground","l":"getTimestep()"},{"p":"controller","c":"ObjectController","l":"getVX()"},{"p":"gameobjects","c":"GameObject","l":"getVX()"},{"p":"rendering","c":"Artist","l":"getVX()"},{"p":"controller","c":"ObjectController","l":"getVY()"},{"p":"gameobjects","c":"GameObject","l":"getVY()"},{"p":"rendering","c":"Artist","l":"getVY()"},{"p":"rendering","c":"AnimationArtist","l":"getW()"},{"p":"gameobjects","c":"RectObject","l":"getWidth()"},{"p":"collider","c":"Collider","l":"getX()"},{"p":"controller","c":"ObjectController","l":"getX()"},{"p":"gameobjects","c":"GameObject","l":"getX()"},{"p":"rendering","c":"Artist","l":"getX()"},{"p":"collider","c":"Collider","l":"getY()"},{"p":"controller","c":"ObjectController","l":"getY()"},{"p":"gameobjects","c":"GameObject","l":"getY()"},{"p":"rendering","c":"Artist","l":"getY()"},{"p":"ui","c":"GameUI","l":"grabFocus()"},{"p":"playground","c":"HighscoreManager","l":"HighscoreManager()","u":"%3Cinit%3E()"},{"p":"collider","c":"Collider","l":"id"},{"p":"gameobjects","c":"GameObject","l":"id"},{"p":"playground","c":"Animation","l":"imageList"},{"p":"gameobjects","c":"GameObject","l":"isActive()"},{"p":"ui","c":"GameUI","l":"isPainting()"},{"p":"playground","c":"Playground","l":"isPaused()"},{"p":"playground","c":"Level1","l":"Level1()","u":"%3Cinit%3E()"},{"p":"playground","c":"Level2","l":"Level2()","u":"%3Cinit%3E()"},{"p":"playground","c":"Level3","l":"Level3()","u":"%3Cinit%3E()"},{"p":"playground","c":"Level4","l":"Level4()","u":"%3Cinit%3E()"},{"p":"playground","c":"Level5","l":"Level5()","u":"%3Cinit%3E()"},{"p":"playground","c":"Level6","l":"Level6()","u":"%3Cinit%3E()"},{"p":"playground","c":"Level7","l":"Level7()","u":"%3Cinit%3E()"},{"p":"playground","c":"LevelBoss","l":"LevelBoss()","u":"%3Cinit%3E()"},{"p":"playground","c":"Playground","l":"levelFinished()"},{"p":"playground","c":"SpaceInvadersLevel","l":"levelFinished()"},{"p":"playground","c":"LevelHitTwice","l":"LevelHitTwice()","u":"%3Cinit%3E()"},{"p":"playground","c":"LevelWithBox","l":"LevelWithBox()","u":"%3Cinit%3E()"},{"p":"controller","c":"LimitedTimeController","l":"LimitedTimeController(double, double)","u":"%3Cinit%3E(double,double)"},{"p":"base","c":"GameLoop","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"base","c":"MultiLevelGame","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"gameobjects","c":"GameObject","l":"MASK"},{"p":"playground","c":"Level4","l":"MAX_HITS"},{"p":"playground","c":"LevelHitTwice","l":"MAX_HITS"},{"p":"controller","c":"MineController","l":"MineController(double)","u":"%3Cinit%3E(double)"},{"p":"base","c":"MultiLevelGame","l":"MultiLevelGame()","u":"%3Cinit%3E()"},{"p":"playground","c":"Music","l":"Music()","u":"%3Cinit%3E()"},{"p":"playground","c":"Music","l":"music(File)","u":"music(java.io.File)"},{"p":"controller","c":"ObjectController","l":"ObjectController()","u":"%3Cinit%3E()"},{"p":"controller","c":"EgoController","l":"onDown(KeyEvent, GameObject)","u":"onDown(java.awt.event.KeyEvent,gameobjects.GameObject)"},{"p":"controller","c":"EgoController","l":"onLeft(KeyEvent, GameObject)","u":"onLeft(java.awt.event.KeyEvent,gameobjects.GameObject)"},{"p":"controller","c":"EgoController","l":"onRight(KeyEvent, GameObject)","u":"onRight(java.awt.event.KeyEvent,gameobjects.GameObject)"},{"p":"controller","c":"CollisionAwareEgoController","l":"onSpace(KeyEvent, GameObject)","u":"onSpace(java.awt.event.KeyEvent,gameobjects.GameObject)"},{"p":"controller","c":"EgoController","l":"onSpace(KeyEvent, GameObject)","u":"onSpace(java.awt.event.KeyEvent,gameobjects.GameObject)"},{"p":"controller","c":"EgoController","l":"onStop(KeyEvent, GameObject)","u":"onStop(java.awt.event.KeyEvent,gameobjects.GameObject)"},{"p":"controller","c":"EgoController","l":"onUp(KeyEvent, GameObject)","u":"onUp(java.awt.event.KeyEvent,gameobjects.GameObject)"},{"p":"playground","c":"Playground","l":"Playground()","u":"%3Cinit%3E()"},{"p":"playground","c":"Playground","l":"preferredSizeX()"},{"p":"playground","c":"SpaceInvadersLevel","l":"preferredSizeX()"},{"p":"playground","c":"Playground","l":"preferredSizeY()"},{"p":"playground","c":"SpaceInvadersLevel","l":"preferredSizeY()"},{"p":"playground","c":"LevelWithBox","l":"prepareLevel(String)","u":"prepareLevel(java.lang.String)"},{"p":"playground","c":"Playground","l":"prepareLevel(String)","u":"prepareLevel(java.lang.String)"},{"p":"playground","c":"SpaceInvadersLevel","l":"prepareLevel(String)","u":"prepareLevel(java.lang.String)"},{"p":"playground","c":"Playground","l":"processKeyEvents(Stack)","u":"processKeyEvents(java.util.Stack)"},{"p":"playground","c":"Playground","l":"processMouseEvents(Stack)","u":"processMouseEvents(java.util.Stack)"},{"p":"gameobjects","c":"GameObject","l":"RADIUS"},{"p":"playground","c":"HighscoreManager","l":"readHSFromFile()"},{"p":"gameobjects","c":"GameObject","l":"RECTANGLE"},{"p":"rendering","c":"RectArtist","l":"RectArtist(GameObject, double, double, Color)","u":"%3Cinit%3E(gameobjects.GameObject,double,double,java.awt.Color)"},{"p":"collider","c":"RectCollider","l":"RectCollider(String, GameObject, double, double)","u":"%3Cinit%3E(java.lang.String,gameobjects.GameObject,double,double)"},{"p":"gameobjects","c":"RectObject","l":"RectObject(String, Playground, double, double, double, double, double, double, Color)","u":"%3Cinit%3E(java.lang.String,playground.Playground,double,double,double,double,double,double,java.awt.Color)"},{"p":"playground","c":"Playground","l":"redraw(Graphics2D)","u":"redraw(java.awt.Graphics2D)"},{"p":"playground","c":"Playground","l":"redrawLevel(Graphics2D)","u":"redrawLevel(java.awt.Graphics2D)"},{"p":"playground","c":"SpaceInvadersLevel","l":"redrawLevel(Graphics2D)","u":"redrawLevel(java.awt.Graphics2D)"},{"p":"ui","c":"GameUI","l":"repaint()"},{"p":"playground","c":"Playground","l":"reset()"},{"p":"ui","c":"GameUI","l":"resetAction()"},{"p":"playground","c":"Playground","l":"resetFlags(int)"},{"p":"controller","c":"CollisionAwareEgoController","l":"restoreDynamicState()"},{"p":"base","c":"GameLoop","l":"runGame(String[])","u":"runGame(java.lang.String[])"},{"p":"playground","c":"SaveGame","l":"save()"},{"p":"controller","c":"CollisionAwareEgoController","l":"saveDynamicState()"},{"p":"playground","c":"SaveGame","l":"SaveGame()","u":"%3Cinit%3E()"},{"p":"gameobjects","c":"GameObject","l":"scol"},{"p":"gameobjects","c":"GameObject","l":"setActive(boolean)"},{"p":"gameobjects","c":"GameObject","l":"setColliders(LinkedList)","u":"setColliders(java.util.LinkedList)"},{"p":"gameobjects","c":"GameObject","l":"setComponentProperty(String, String, Object)","u":"setComponentProperty(java.lang.String,java.lang.String,java.lang.Object)"},{"p":"collider","c":"Collider","l":"setController(ObjectController)","u":"setController(controller.ObjectController)"},{"p":"controller","c":"ObjectController","l":"setDummy(String)","u":"setDummy(java.lang.String)"},{"p":"playground","c":"Playground","l":"setGameTime(double)"},{"p":"playground","c":"Playground","l":"setGlobalFlag(String, Object)","u":"setGlobalFlag(java.lang.String,java.lang.Object)"},{"p":"playground","c":"Playground","l":"setLevelFlag(String, Object)","u":"setLevelFlag(java.lang.String,java.lang.Object)"},{"p":"collider","c":"Collider","l":"setObject(GameObject)","u":"setObject(gameobjects.GameObject)"},{"p":"controller","c":"ObjectController","l":"setObject(GameObject)","u":"setObject(gameobjects.GameObject)"},{"p":"gameobjects","c":"GameObject","l":"setObjectController(ObjectController)","u":"setObjectController(controller.ObjectController)"},{"p":"gameobjects","c":"GameObject","l":"setObjectFlag(String, Object)","u":"setObjectFlag(java.lang.String,java.lang.Object)"},{"p":"collider","c":"Collider","l":"setOffsets(double, double)","u":"setOffsets(double,double)"},{"p":"ui","c":"GameUI","l":"setPainting()"},{"p":"playground","c":"Playground","l":"setPaused(boolean)"},{"p":"collider","c":"Collider","l":"setPlayground(Playground)","u":"setPlayground(playground.Playground)"},{"p":"controller","c":"ObjectController","l":"setPlayground(Playground)","u":"setPlayground(playground.Playground)"},{"p":"gameobjects","c":"GameObject","l":"setPlayground(Playground)","u":"setPlayground(playground.Playground)"},{"p":"ui","c":"GameUI","l":"setPlayground(Playground)","u":"setPlayground(playground.Playground)"},{"p":"gameobjects","c":"TextObject","l":"setText(String)","u":"setText(java.lang.String)"},{"p":"rendering","c":"TextArtist","l":"setText(String)","u":"setText(java.lang.String)"},{"p":"rendering","c":"TextArtist","l":"setTextHeight(double)"},{"p":"rendering","c":"TextArtist","l":"setTextWidth(double)"},{"p":"playground","c":"Playground","l":"setTimestep(double)"},{"p":"controller","c":"ObjectController","l":"setVX(double)"},{"p":"gameobjects","c":"GameObject","l":"setVX(double)"},{"p":"controller","c":"ObjectController","l":"setVY(double)"},{"p":"gameobjects","c":"GameObject","l":"setVY(double)"},{"p":"controller","c":"ObjectController","l":"setX(double)"},{"p":"gameobjects","c":"GameObject","l":"setX(double)"},{"p":"controller","c":"ObjectController","l":"setY(double)"},{"p":"gameobjects","c":"GameObject","l":"setY(double)"},{"p":"playground","c":"SpaceInvadersLevel","l":"SHOTSPEED"},{"p":"playground","c":"Animation","l":"showtimeList"},{"p":"controller","c":"SimpleShotController","l":"SimpleShotController()","u":"%3Cinit%3E()"},{"p":"base","c":"GameLoop","l":"SIZEX"},{"p":"base","c":"GameLoop","l":"SIZEY"},{"p":"playground","c":"SpaceInvadersLevel","l":"SpaceInvadersLevel()","u":"%3Cinit%3E()"},{"p":"playground","c":"SpaceInvadersLevelAua","l":"SpaceInvadersLevelAua()","u":"%3Cinit%3E()"},{"p":"controller","c":"CollisionAwareEgoController","l":"stopObject()"},{"p":"controller","c":"EgoController","l":"stopObject()"},{"p":"rendering","c":"TextArtist","l":"TextArtist(GameObject, String, int, Color)","u":"%3Cinit%3E(gameobjects.GameObject,java.lang.String,int,java.awt.Color)"},{"p":"gameobjects","c":"TextObject","l":"TextObject(String, Playground, double, double, double, double, String, int, Color)","u":"%3Cinit%3E(java.lang.String,playground.Playground,double,double,double,double,java.lang.String,int,java.awt.Color)"},{"p":"playground","c":"Playground","l":"togglePause()"},{"p":"collider","c":"CircleCollider","l":"toString()"},{"p":"collider","c":"Collider","l":"toString()"},{"p":"collider","c":"RectCollider","l":"toString()"},{"p":"controller","c":"EgoController","l":"updateObject()"},{"p":"controller","c":"EnemyController","l":"updateObject()"},{"p":"controller","c":"FallingStarController","l":"updateObject()"},{"p":"controller","c":"LimitedTimeController","l":"updateObject()"},{"p":"controller","c":"MineController","l":"updateObject()"},{"p":"controller","c":"ObjectController","l":"updateObject()"},{"p":"controller","c":"SimpleShotController","l":"updateObject()"},{"p":"controller","c":"ZickZackController","l":"updateObject()"},{"p":"gameobjects","c":"GameObject","l":"updateObject()"},{"p":"playground","c":"Playground","l":"updateObjects()"},{"p":"ui","c":"GameUI","l":"waitWhilePainting()"},{"p":"playground","c":"HighscoreManager","l":"writeHSToFile(Integer, Integer)","u":"writeHSToFile(java.lang.Integer,java.lang.Integer)"},{"p":"controller","c":"ZickZackController","l":"ZickZackController(double, double)","u":"%3Cinit%3E(double,double)"}];updateSearchResults();
\ No newline at end of file
+memberSearchIndex = [{"p":"controller","c":"ReboundController","l":"ReboundController()","u":"%3Cinit%3E()"},{"p":"controller","c":"ReboundController","l":"updateObject()"}];updateSearchResults();
\ No newline at end of file
diff --git a/spaceinvaders/GameProject/doc/overview-tree.html b/spaceinvaders/GameProject/doc/overview-tree.html
index 86b7820..4d94a1f 100644
--- a/spaceinvaders/GameProject/doc/overview-tree.html
+++ b/spaceinvaders/GameProject/doc/overview-tree.html
@@ -1,11 +1,11 @@
-
+
Class Hierarchy
-
+
@@ -28,7 +28,6 @@ loadScripts(document, 'script');
diff --git a/spaceinvaders/GameProject/doc/package-search-index.js b/spaceinvaders/GameProject/doc/package-search-index.js
index f6dca23..1faf515 100644
--- a/spaceinvaders/GameProject/doc/package-search-index.js
+++ b/spaceinvaders/GameProject/doc/package-search-index.js
@@ -1 +1 @@
-packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"base"},{"l":"collider"},{"l":"controller"},{"l":"gameobjects"},{"l":"playground"},{"l":"rendering"},{"l":"ui"}];updateSearchResults();
\ No newline at end of file
+packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"controller"}];updateSearchResults();
\ No newline at end of file
diff --git a/spaceinvaders/GameProject/doc/script.js b/spaceinvaders/GameProject/doc/script.js
index 0765364..864989c 100644
--- a/spaceinvaders/GameProject/doc/script.js
+++ b/spaceinvaders/GameProject/doc/script.js
@@ -1,26 +1,26 @@
/*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
*/
var moduleSearchIndex;
diff --git a/spaceinvaders/GameProject/doc/search.js b/spaceinvaders/GameProject/doc/search.js
index df0e6fb..2246cdd 100644
--- a/spaceinvaders/GameProject/doc/search.js
+++ b/spaceinvaders/GameProject/doc/search.js
@@ -1,26 +1,26 @@
/*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
*
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
*
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
*/
var noResult = {l: "No results found"};
diff --git a/spaceinvaders/GameProject/doc/tag-search-index.js b/spaceinvaders/GameProject/doc/tag-search-index.js
index f2a440c..0367dae 100644
--- a/spaceinvaders/GameProject/doc/tag-search-index.js
+++ b/spaceinvaders/GameProject/doc/tag-search-index.js
@@ -1 +1 @@
-tagSearchIndex = [{"l":"Constant Field Values","h":"","u":"constant-values.html"}];updateSearchResults();
\ No newline at end of file
+tagSearchIndex = [];updateSearchResults();
\ No newline at end of file
diff --git a/spaceinvaders/GameProject/doc/type-search-index.js b/spaceinvaders/GameProject/doc/type-search-index.js
index 4d5ecb2..74569fd 100644
--- a/spaceinvaders/GameProject/doc/type-search-index.js
+++ b/spaceinvaders/GameProject/doc/type-search-index.js
@@ -1 +1 @@
-typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"gameobjects","l":"AnimatedGameobject"},{"p":"playground","l":"Animation"},{"p":"rendering","l":"AnimationArtist"},{"p":"rendering","l":"Artist"},{"p":"rendering","l":"CircleArtist"},{"p":"collider","l":"CircleCollider"},{"p":"collider","l":"Collider"},{"p":"controller","l":"CollisionAwareEgoController"},{"p":"controller","l":"EgoController"},{"p":"gameobjects","l":"EgoObject"},{"p":"controller","l":"EnemyController"},{"p":"gameobjects","l":"FallingStar"},{"p":"controller","l":"FallingStarController"},{"p":"base","l":"GameLoop"},{"p":"gameobjects","l":"GameObject"},{"p":"ui","l":"GameUI"},{"p":"playground","l":"HighscoreManager"},{"p":"playground","l":"Level1"},{"p":"playground","l":"Level2"},{"p":"playground","l":"Level3"},{"p":"playground","l":"Level4"},{"p":"playground","l":"Level5"},{"p":"playground","l":"Level6"},{"p":"playground","l":"Level7"},{"p":"playground","l":"LevelBoss"},{"p":"playground","l":"LevelHitTwice"},{"p":"playground","l":"LevelWithBox"},{"p":"controller","l":"LimitedTimeController"},{"p":"controller","l":"MineController"},{"p":"base","l":"MultiLevelGame"},{"p":"playground","l":"Music"},{"p":"controller","l":"ObjectController"},{"p":"playground","l":"Playground"},{"p":"rendering","l":"RectArtist"},{"p":"collider","l":"RectCollider"},{"p":"gameobjects","l":"RectObject"},{"p":"playground","l":"SaveGame"},{"p":"controller","l":"SimpleShotController"},{"p":"playground","l":"SpaceInvadersLevel"},{"p":"playground","l":"SpaceInvadersLevelAua"},{"p":"rendering","l":"TextArtist"},{"p":"gameobjects","l":"TextObject"},{"p":"controller","l":"ZickZackController"}];updateSearchResults();
\ No newline at end of file
+typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"controller","l":"ReboundController"}];updateSearchResults();
\ No newline at end of file
diff --git a/spaceinvaders/GameProject/log/log4j.log b/spaceinvaders/GameProject/log/log4j.log
index d875e47..7e67825 100644
--- a/spaceinvaders/GameProject/log/log4j.log
+++ b/spaceinvaders/GameProject/log/log4j.log
@@ -1094,3 +1094,90 @@
2022-05-18 16:16:35,304 INFO playground.Animation - img added .\video/heart0.png
2022-05-18 16:16:35,307 INFO playground.Animation - img added .\video/heart1.png
2022-05-18 16:16:35,311 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
+2022-05-18 16:26:22,524 INFO base.GameLoop - GUI starts
+2022-05-18 16:26:24,250 INFO base.GameLoop - GUI NEW
+2022-05-18 16:26:24,250 INFO playground.SpaceInvadersLevel - PREPARE
+2022-05-18 16:26:24,303 INFO playground.Animation - img added .\video/sweetAlien0.png
+2022-05-18 16:26:24,311 INFO playground.Animation - img added .\video/sweetAlien1.png
+2022-05-18 16:26:24,313 INFO playground.Animation - img added .\video/sweetAlien2.png
+2022-05-18 16:26:24,317 INFO playground.Animation - img added .\video/sweetAlien3.png
+2022-05-18 16:26:24,321 INFO playground.Animation - img added .\video/sweetAlien4.png
+2022-05-18 16:26:24,324 INFO playground.Animation - img added .\video/sweetAlien5.png
+2022-05-18 16:26:24,327 INFO playground.Animation - img added .\video/sweetAlien6.png
+2022-05-18 16:26:24,329 INFO playground.Animation - img added .\video/sweetAlien7.png
+2022-05-18 16:26:24,337 INFO playground.Animation - img added .\video/heart0.png
+2022-05-18 16:26:24,340 INFO playground.Animation - img added .\video/heart1.png
+2022-05-18 16:26:24,344 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
+2022-05-18 16:37:15,550 INFO base.GameLoop - GUI starts
+2022-05-18 16:37:17,390 INFO base.GameLoop - GUI NEW
+2022-05-18 16:37:17,391 INFO playground.SpaceInvadersLevel - PREPARE
+2022-05-18 16:37:17,446 INFO playground.Animation - img added .\video/sweetAlien0.png
+2022-05-18 16:37:17,454 INFO playground.Animation - img added .\video/sweetAlien1.png
+2022-05-18 16:37:17,457 INFO playground.Animation - img added .\video/sweetAlien2.png
+2022-05-18 16:37:17,461 INFO playground.Animation - img added .\video/sweetAlien3.png
+2022-05-18 16:37:17,465 INFO playground.Animation - img added .\video/sweetAlien4.png
+2022-05-18 16:37:17,470 INFO playground.Animation - img added .\video/sweetAlien5.png
+2022-05-18 16:37:17,473 INFO playground.Animation - img added .\video/sweetAlien6.png
+2022-05-18 16:37:17,475 INFO playground.Animation - img added .\video/sweetAlien7.png
+2022-05-18 16:37:17,483 INFO playground.Animation - img added .\video/heart0.png
+2022-05-18 16:37:17,486 INFO playground.Animation - img added .\video/heart1.png
+2022-05-18 16:37:17,491 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
+2022-05-18 17:14:06,549 INFO base.GameLoop - GUI starts
+2022-05-18 17:14:09,335 INFO base.GameLoop - GUI NEW
+2022-05-18 17:14:09,335 INFO playground.SpaceInvadersLevel - PREPARE
+2022-05-18 17:14:09,386 INFO playground.Animation - img added .\video/sweetAlien0.png
+2022-05-18 17:14:09,393 INFO playground.Animation - img added .\video/sweetAlien1.png
+2022-05-18 17:14:09,396 INFO playground.Animation - img added .\video/sweetAlien2.png
+2022-05-18 17:14:09,399 INFO playground.Animation - img added .\video/sweetAlien3.png
+2022-05-18 17:14:09,403 INFO playground.Animation - img added .\video/sweetAlien4.png
+2022-05-18 17:14:09,407 INFO playground.Animation - img added .\video/sweetAlien5.png
+2022-05-18 17:14:09,410 INFO playground.Animation - img added .\video/sweetAlien6.png
+2022-05-18 17:14:09,412 INFO playground.Animation - img added .\video/sweetAlien7.png
+2022-05-18 17:14:09,419 INFO playground.Animation - img added .\video/heart0.png
+2022-05-18 17:14:09,422 INFO playground.Animation - img added .\video/heart1.png
+2022-05-18 17:14:09,427 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
+2022-05-18 17:14:31,903 INFO base.GameLoop - GUI starts
+2022-05-18 17:14:33,672 INFO base.GameLoop - GUI NEW
+2022-05-18 17:14:33,673 INFO playground.SpaceInvadersLevel - PREPARE
+2022-05-18 17:14:33,726 INFO playground.Animation - img added .\video/sweetAlien0.png
+2022-05-18 17:14:33,734 INFO playground.Animation - img added .\video/sweetAlien1.png
+2022-05-18 17:14:33,736 INFO playground.Animation - img added .\video/sweetAlien2.png
+2022-05-18 17:14:33,740 INFO playground.Animation - img added .\video/sweetAlien3.png
+2022-05-18 17:14:33,744 INFO playground.Animation - img added .\video/sweetAlien4.png
+2022-05-18 17:14:33,748 INFO playground.Animation - img added .\video/sweetAlien5.png
+2022-05-18 17:14:33,751 INFO playground.Animation - img added .\video/sweetAlien6.png
+2022-05-18 17:14:33,753 INFO playground.Animation - img added .\video/sweetAlien7.png
+2022-05-18 17:14:33,761 INFO playground.Animation - img added .\video/heart0.png
+2022-05-18 17:14:33,764 INFO playground.Animation - img added .\video/heart1.png
+2022-05-18 17:14:33,768 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
+2022-05-18 17:19:18,165 INFO base.GameLoop - GUI starts
+2022-05-18 17:19:20,583 INFO base.GameLoop - GUI NEW
+2022-05-18 17:19:20,583 INFO playground.SpaceInvadersLevel - PREPARE
+2022-05-18 17:19:20,637 INFO playground.Animation - img added .\video/sweetAlien0.png
+2022-05-18 17:19:20,645 INFO playground.Animation - img added .\video/sweetAlien1.png
+2022-05-18 17:19:20,647 INFO playground.Animation - img added .\video/sweetAlien2.png
+2022-05-18 17:19:20,651 INFO playground.Animation - img added .\video/sweetAlien3.png
+2022-05-18 17:19:20,655 INFO playground.Animation - img added .\video/sweetAlien4.png
+2022-05-18 17:19:20,659 INFO playground.Animation - img added .\video/sweetAlien5.png
+2022-05-18 17:19:20,662 INFO playground.Animation - img added .\video/sweetAlien6.png
+2022-05-18 17:19:20,665 INFO playground.Animation - img added .\video/sweetAlien7.png
+2022-05-18 17:19:20,672 INFO playground.Animation - img added .\video/heart0.png
+2022-05-18 17:19:20,675 INFO playground.Animation - img added .\video/heart1.png
+2022-05-18 17:19:20,679 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
+2022-05-18 17:19:58,938 INFO base.GameLoop - GUI starts
+2022-05-18 17:20:00,839 INFO base.GameLoop - GUI NEW
+2022-05-18 17:20:00,839 INFO playground.SpaceInvadersLevel - PREPARE
+2022-05-18 17:20:00,891 INFO playground.Animation - img added .\video/sweetAlien0.png
+2022-05-18 17:20:00,899 INFO playground.Animation - img added .\video/sweetAlien1.png
+2022-05-18 17:20:00,902 INFO playground.Animation - img added .\video/sweetAlien2.png
+2022-05-18 17:20:00,905 INFO playground.Animation - img added .\video/sweetAlien3.png
+2022-05-18 17:20:00,910 INFO playground.Animation - img added .\video/sweetAlien4.png
+2022-05-18 17:20:00,914 INFO playground.Animation - img added .\video/sweetAlien5.png
+2022-05-18 17:20:00,916 INFO playground.Animation - img added .\video/sweetAlien6.png
+2022-05-18 17:20:00,919 INFO playground.Animation - img added .\video/sweetAlien7.png
+2022-05-18 17:20:00,926 INFO playground.Animation - img added .\video/heart0.png
+2022-05-18 17:20:00,929 INFO playground.Animation - img added .\video/heart1.png
+2022-05-18 17:20:00,934 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
+2022-05-18 17:20:56,882 INFO playground.SpaceInvadersLevel - no enemies left, level done.
+2022-05-18 17:20:56,883 INFO base.GameLoop - reached end of levels
+2022-05-18 17:20:56,883 INFO base.GameLoop - Game ends. Bye.
diff --git a/spaceinvaders/GameProject/src/controller/ReboundController.java b/spaceinvaders/GameProject/src/controller/ReboundController.java
new file mode 100644
index 0000000..671a489
--- /dev/null
+++ b/spaceinvaders/GameProject/src/controller/ReboundController.java
@@ -0,0 +1,17 @@
+package controller;
+
+public class ReboundController extends ObjectController {
+
+ @Override
+ public void updateObject() {
+ // TODO Auto-generated method stub
+ if(this.getX()<30 || this.getX()>670) {
+ this.setVX(this.getVX()* -1);
+ }
+ if(this.getY()<30 || this.getY()>670) {
+ this.setVY(this.getVY()* -1);
+ }
+ this.applySpeedVector();
+ }
+
+}
diff --git a/spaceinvaders/GameProject/src/playground/LevelMovingObjects.java b/spaceinvaders/GameProject/src/playground/LevelMovingObjects.java
index dd93acf..fc84666 100644
--- a/spaceinvaders/GameProject/src/playground/LevelMovingObjects.java
+++ b/spaceinvaders/GameProject/src/playground/LevelMovingObjects.java
@@ -1,12 +1,25 @@
package playground;
+import java.awt.Color;
+import gameobjects.*;
+import controller.*;
/** This level adds two distracting objects to the canvas that cannot collide but bounce around all the time.
*/
public class LevelMovingObjects extends SpaceInvadersLevel {
// TODO your code here
+
+ @Override
+ public void prepareLevel(String id) {
+ super.prepareLevel(id);
+ RectObject blueBox = new RectObject("BlueBox", this, 300, 300, 170, 70, 30, 30, Color.BLUE);
+ this.addObject(blueBox);
+ ReboundController boxControl = new ReboundController();
+ blueBox.addController(boxControl);
+ }
+
/** "Moving Objects Level!" is the message.