blob: a386429d54bc36136645f286b0537466b0cb5527 (
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
50
|
package ch.epfl.xblast.server;
import ch.epfl.xblast.server.painter.BoardPainter;
/**
* A level.
*
* @author Pacien TRAN-GIRARD (261948)
* @author Timothée FLOURE (257420)
*/
public final class Level {
/**
* Level build with the default images and the default players/explosions/board parameters.
*/
static final Level DEFAULT_LEVEL = new Level(BoardPainter.DEFAULT_BOARD_PAINTER, GameState.DEFAULT_GAME_STATE);
private final BoardPainter painter;
private final GameState initialState;
/**
* Instantiates a new level.
*
* @param painter painter related to the level
* @param initialState initial game state of the level
*/
public Level(BoardPainter painter, GameState initialState) {
this.painter = painter;
this.initialState = initialState;
}
/**
* Returns the painter related to the current level.
*
* @return the painter related to the current level
*/
public BoardPainter painter() {
return this.painter;
}
/**
* Returns the initial game state ot the level.
*
* @return the initial game state ot the level
*/
public GameState initialState() {
return this.initialState;
}
}
|