blob: baaf6500393bee4461cde7b160517f2ef8a3ec06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
package esieequest.model.characters;
import lombok.Getter;
import net.pacien.util.CleanJSONObject;
import org.json.simple.JSONObject;
import esieequest.controller.utils.SerialisableObject;
import esieequest.model.Game;
import esieequest.view.Viewable;
/**
* A character that can talk with the player.
*
* @author Pacien TRAN-GIRARD
*/
public abstract class SimpleCharacter implements SerialisableObject {
@Getter
private final String name;
/**
* Creates a Character with the given name.
*
* @param name
* the name of the Character
*/
public SimpleCharacter(final String name) {
this.name = name;
}
/**
* Makes the Character talk. Called when the player uses the TALK Command.
*
* @return what the Character says
*/
public abstract void talk(final Game game, final Viewable view);
@Override
public JSONObject serialise() {
return new CleanJSONObject();
}
@Override
public void deserialise(final JSONObject o) {
return;
}
}
|