Refactoring to allow MyNewLevelGenerator to determine the level type, difficulty and music based on the player metrics.
Work in progress.
This commit is contained in:
@@ -18,11 +18,14 @@ import dk.itu.mario.level.RandomLevel;
|
||||
import dk.itu.mario.scene.LevelScene;
|
||||
|
||||
public class DataRecorder {
|
||||
|
||||
public static final DataRecorder BLANK_RECORD = new DataRecorder();
|
||||
|
||||
public boolean recording = true;
|
||||
private boolean []keys, keyPressed;
|
||||
|
||||
@XStreamOmitField
|
||||
private RandomLevel level;
|
||||
private boolean []keys, keyPressed;
|
||||
|
||||
@XStreamOmitField
|
||||
private LevelScene levelScene;
|
||||
|
||||
@@ -111,6 +114,12 @@ public class DataRecorder {
|
||||
return detailedLog;
|
||||
}
|
||||
|
||||
/**
|
||||
* For use by BLANK_RECORD
|
||||
*/
|
||||
private DataRecorder() {;
|
||||
}
|
||||
|
||||
public DataRecorder(LevelScene levelScene, RandomLevel level, boolean []keys){
|
||||
this.levelScene = levelScene;
|
||||
this.level = level;
|
||||
|
||||
@@ -34,22 +34,21 @@ import dk.itu.mario.scene.WinScene;
|
||||
|
||||
public class MarioComponent extends JComponent implements Runnable,
|
||||
KeyListener, FocusListener, MouseListener {
|
||||
|
||||
private static final long serialVersionUID = 739318775993206607L;
|
||||
|
||||
public static final int TICKS_PER_SECOND = 24;
|
||||
|
||||
public static final int EVOLVE_VERSION = 4;
|
||||
public static final int GAME_VERSION = 4;
|
||||
|
||||
private boolean running = false;
|
||||
private boolean screenshotTaken = false;
|
||||
private int width, height;
|
||||
private GraphicsConfiguration graphicsConfiguration;
|
||||
private Scene scene;
|
||||
private SonarSoundEngine sound;
|
||||
private boolean useScale2x = false;
|
||||
private boolean isCustom = false;
|
||||
private int width, height;
|
||||
private GraphicsConfiguration graphicsConfiguration;
|
||||
private LevelGenerator levelGenerator;
|
||||
private Scene scene;
|
||||
private SonarSoundEngine sound;
|
||||
private Scale2x scale2x = new Scale2x(320, 240);
|
||||
|
||||
public MarioComponent(int width, int height, boolean isCustomized,
|
||||
|
||||
Reference in New Issue
Block a user