Create package brain, move everything there that memorizes data.

This commit is contained in:
Jan Philipp Timme 2014-11-28 19:12:55 +01:00
parent 232411913d
commit 0afa327fda
24 changed files with 31 additions and 27 deletions

View File

@ -9,9 +9,9 @@ import java.awt.image.BufferStrategy;
import javax.swing.JFrame;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.control.Keyboard;
import de.teamteamteam.spacescooter.screen.Screen;
import de.teamteamteam.spacescooter.utility.GameConfig;
/**
* The game will take place in this beautiful window.

View File

@ -3,12 +3,12 @@ package de.teamteamteam.spacescooter;
import java.awt.EventQueue;
import java.lang.reflect.InvocationTargetException;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.screen.LoadingScreen;
import de.teamteamteam.spacescooter.screen.Screen;
import de.teamteamteam.spacescooter.screen.SuperScreen;
import de.teamteamteam.spacescooter.thread.PaintThread;
import de.teamteamteam.spacescooter.thread.UpdateThread;
import de.teamteamteam.spacescooter.utility.GameConfig;
import de.teamteamteam.spacescooter.utility.GraphicsSettings;
import de.teamteamteam.spacescooter.utility.Loader;

View File

@ -2,7 +2,7 @@ package de.teamteamteam.spacescooter.background;
import java.awt.Graphics2D;
import de.teamteamteam.spacescooter.utility.GameConfig;
import de.teamteamteam.spacescooter.brain.GameConfig;
public class ScrollingBackground extends Background {

View File

@ -1,4 +1,4 @@
package de.teamteamteam.spacescooter.gui;
package de.teamteamteam.spacescooter.brain;
/**
* TODO: Intelligently merge this with Score class.

View File

@ -1,4 +1,4 @@
package de.teamteamteam.spacescooter.utility;
package de.teamteamteam.spacescooter.brain;
/**
* This static class contains important game configuration.

View File

@ -1,4 +1,4 @@
package de.teamteamteam.spacescooter.datastructure;
package de.teamteamteam.spacescooter.brain;
/**
* Score Class to represent the Player's Score

View File

@ -1,4 +1,4 @@
package de.teamteamteam.spacescooter.entity;
package de.teamteamteam.spacescooter.brain;
/**
* TODO: Rename and merge with other classes containing single static information.

View File

@ -4,10 +4,10 @@ import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.entity.spi.Paintable;
import de.teamteamteam.spacescooter.entity.spi.Updateable;
import de.teamteamteam.spacescooter.screen.Screen;
import de.teamteamteam.spacescooter.utility.GameConfig;
import de.teamteamteam.spacescooter.utility.Loader;
/**

View File

@ -1,13 +1,12 @@
package de.teamteamteam.spacescooter.entity;
import de.teamteamteam.spacescooter.datastructure.Score;
import de.teamteamteam.spacescooter.brain.Credits;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.brain.Score;
import de.teamteamteam.spacescooter.entity.enemy.Enemy;
import de.teamteamteam.spacescooter.entity.shot.Shot;
import de.teamteamteam.spacescooter.entity.spi.Collidable;
import de.teamteamteam.spacescooter.entity.spi.Hittable;
import de.teamteamteam.spacescooter.gui.Credits;
import de.teamteamteam.spacescooter.utility.GameConfig;
/**
* A LivingEntity is an Entity that is able to take damage and to collide with

View File

@ -2,13 +2,14 @@ package de.teamteamteam.spacescooter.entity;
import java.awt.event.KeyEvent;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.brain.StaticValue;
import de.teamteamteam.spacescooter.control.Keyboard;
import de.teamteamteam.spacescooter.control.KeyboardListener;
import de.teamteamteam.spacescooter.entity.item.Item;
import de.teamteamteam.spacescooter.entity.shot.Shot;
import de.teamteamteam.spacescooter.entity.spi.Collidable;
import de.teamteamteam.spacescooter.sound.SoundSystem;
import de.teamteamteam.spacescooter.utility.GameConfig;
/**
* Class that represents the Player, and handle all the KeyboardActions

View File

@ -1,8 +1,8 @@
package de.teamteamteam.spacescooter.entity.enemy;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.entity.explosion.MultiExplosion;
import de.teamteamteam.spacescooter.gui.BossBar;
import de.teamteamteam.spacescooter.utility.GameConfig;
import de.teamteamteam.spacescooter.utility.Random;
public class EnemyBoss extends Enemy{

View File

@ -1,10 +1,10 @@
package de.teamteamteam.spacescooter.entity.enemy;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.entity.Player;
import de.teamteamteam.spacescooter.entity.explosion.MultiExplosion;
import de.teamteamteam.spacescooter.entity.item.Item;
import de.teamteamteam.spacescooter.screen.GameScreen;
import de.teamteamteam.spacescooter.utility.GameConfig;
import de.teamteamteam.spacescooter.utility.Random;
public class EnemyThree extends Enemy{

View File

@ -1,7 +1,7 @@
package de.teamteamteam.spacescooter.entity.enemy;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.entity.explosion.ExplosionTwo;
import de.teamteamteam.spacescooter.utility.GameConfig;
import de.teamteamteam.spacescooter.utility.Random;
public class EnemyTwo extends Enemy{

View File

@ -1,7 +1,7 @@
package de.teamteamteam.spacescooter.entity.item;
import de.teamteamteam.spacescooter.brain.Credits;
import de.teamteamteam.spacescooter.entity.Player;
import de.teamteamteam.spacescooter.gui.Credits;
public class ItemCredit extends Item {

View File

@ -1,11 +1,11 @@
package de.teamteamteam.spacescooter.entity.shot;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.entity.CollidableEntity;
import de.teamteamteam.spacescooter.entity.Player;
import de.teamteamteam.spacescooter.entity.enemy.Enemy;
import de.teamteamteam.spacescooter.entity.spi.Collidable;
import de.teamteamteam.spacescooter.sound.SoundSystem;
import de.teamteamteam.spacescooter.utility.GameConfig;
import de.teamteamteam.spacescooter.utility.Random;
/**

View File

@ -5,7 +5,7 @@ import java.awt.Font;
import java.awt.Graphics2D;
import de.teamteamteam.spacescooter.entity.Entity;
import de.teamteamteam.spacescooter.datastructure.Score;
import de.teamteamteam.spacescooter.brain.Score;
public class ScoreBar extends Entity {

View File

@ -1,6 +1,7 @@
package de.teamteamteam.spacescooter.level;
import de.teamteamteam.spacescooter.background.StarBackground;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.entity.Entity;
import de.teamteamteam.spacescooter.entity.Player;
import de.teamteamteam.spacescooter.entity.enemy.EnemyBoss;
@ -8,7 +9,6 @@ import de.teamteamteam.spacescooter.entity.enemy.EnemyOne;
import de.teamteamteam.spacescooter.entity.enemy.EnemyThree;
import de.teamteamteam.spacescooter.entity.enemy.EnemyTwo;
import de.teamteamteam.spacescooter.screen.GameScreen;
import de.teamteamteam.spacescooter.utility.GameConfig;
import de.teamteamteam.spacescooter.utility.Loader;
import de.teamteamteam.spacescooter.utility.Random;

View File

@ -6,10 +6,10 @@ import java.awt.Graphics2D;
import java.awt.event.KeyEvent;
import java.awt.image.BufferedImage;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.control.Keyboard;
import de.teamteamteam.spacescooter.entity.Player;
import de.teamteamteam.spacescooter.gui.Button;
import de.teamteamteam.spacescooter.utility.GameConfig;
import de.teamteamteam.spacescooter.utility.Loader;
/**

View File

@ -6,10 +6,10 @@ import java.awt.Graphics2D;
import java.awt.event.KeyEvent;
import java.awt.image.BufferedImage;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.control.Keyboard;
import de.teamteamteam.spacescooter.entity.Player;
import de.teamteamteam.spacescooter.gui.Button;
import de.teamteamteam.spacescooter.utility.GameConfig;
import de.teamteamteam.spacescooter.utility.Loader;
/**

View File

@ -3,7 +3,8 @@ package de.teamteamteam.spacescooter.screen;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import de.teamteamteam.spacescooter.utility.GameConfig;
import de.teamteamteam.spacescooter.brain.GameConfig;
/**
* This is the LoadingScreen, which is displayed when the game is started.

View File

@ -6,11 +6,11 @@ import java.awt.Graphics2D;
import java.awt.event.KeyEvent;
import de.teamteamteam.spacescooter.background.StarBackground;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.control.Keyboard;
import de.teamteamteam.spacescooter.entity.Player;
import de.teamteamteam.spacescooter.gui.Button;
import de.teamteamteam.spacescooter.sound.SoundSystem;
import de.teamteamteam.spacescooter.utility.GameConfig;
/**
* This Screen show the games main menu.

View File

@ -6,13 +6,13 @@ import java.awt.Graphics2D;
import java.awt.event.KeyEvent;
import java.awt.image.BufferedImage;
import de.teamteamteam.spacescooter.brain.Credits;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.brain.StaticValue;
import de.teamteamteam.spacescooter.control.Keyboard;
import de.teamteamteam.spacescooter.entity.Player;
import de.teamteamteam.spacescooter.entity.StaticValue;
import de.teamteamteam.spacescooter.gui.Button;
import de.teamteamteam.spacescooter.gui.Credits;
import de.teamteamteam.spacescooter.gui.ShopOffer;
import de.teamteamteam.spacescooter.utility.GameConfig;
import de.teamteamteam.spacescooter.utility.Loader;
public class ShopScreen extends Screen {

View File

@ -4,6 +4,8 @@ import java.awt.DisplayMode;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import de.teamteamteam.spacescooter.brain.GameConfig;
/**
* GraphicsSettings allows to fetch the current graphical settings in order
* to determine a sane refresh rate and the current screen resolution.

View File

@ -11,6 +11,7 @@ import javax.imageio.ImageIO;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.UnsupportedAudioFileException;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.level.LevelConfig;
import de.teamteamteam.spacescooter.level.LevelConfigParser;
import de.teamteamteam.spacescooter.screen.LoadingScreen;