You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
903 B
44 lines
903 B
package seng202.group9.Controller;
|
|
|
|
import java.io.Serializable;
|
|
|
|
/**
|
|
* Created by fwy13 on 16/09/16.
|
|
* Users last session state is store here.
|
|
*/
|
|
public class Session implements Serializable {
|
|
private SceneCode sceneDisplayed;
|
|
|
|
/**
|
|
* Constructor for a new session
|
|
*/
|
|
public Session(){
|
|
//blank constructor
|
|
this.sceneDisplayed = SceneCode.INITIAL;
|
|
}
|
|
|
|
/**
|
|
* Constructor for a previous session.
|
|
* @param scene
|
|
*/
|
|
public Session(SceneCode scene){
|
|
this.sceneDisplayed = scene;
|
|
}
|
|
|
|
/**
|
|
* changes the serialized scene.
|
|
* @param sceneDisplayed
|
|
*/
|
|
public void setSceneDisplayed(SceneCode sceneDisplayed) {
|
|
this.sceneDisplayed = sceneDisplayed;
|
|
}
|
|
|
|
/**
|
|
* gets the last scene displayed.
|
|
* @return
|
|
*/
|
|
public SceneCode getSceneDisplayed() {
|
|
return sceneDisplayed;
|
|
}
|
|
}
|