7485
|
1 |
/*
|
|
2 |
* Hedgewars for Android. An Android port of Hedgewars, a free turn based strategy game
|
|
3 |
* Copyright (c) 2011-2012 Richard Deurwaarder <xeli@xelification.com>
|
|
4 |
*
|
|
5 |
* This program is free software; you can redistribute it and/or modify
|
|
6 |
* it under the terms of the GNU General Public License as published by
|
|
7 |
* the Free Software Foundation; version 2 of the License
|
|
8 |
*
|
|
9 |
* This program is distributed in the hope that it will be useful,
|
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 |
* GNU General Public License for more details.
|
|
13 |
*
|
|
14 |
* You should have received a copy of the GNU General Public License
|
|
15 |
* along with this program; if not, write to the Free Software
|
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
|
17 |
*/
|
|
18 |
|
|
19 |
package org.hedgewars.hedgeroid.Datastructures;
|
|
20 |
|
|
21 |
import java.util.ArrayList;
|
|
22 |
import java.util.Collections;
|
|
23 |
import java.util.List;
|
|
24 |
|
|
25 |
|
|
26 |
/**
|
|
27 |
* Game configuration from the point of view of the UI. This differs slightly from the
|
|
28 |
* frontlib view, because the engine allows setting a separate initial health and weapon set
|
|
29 |
* for each hog, while the Android UI currently only supports both attributes on a per-game
|
|
30 |
* basis (initial health is contained in the scheme).
|
|
31 |
*
|
|
32 |
* This difference means that creating a GameConfig object from a frontlib object can, in
|
|
33 |
* theory, lose information. This does not cause problems at the moment because for now
|
|
34 |
* weaponset and initial health are always per-game, but that might change in the future.
|
|
35 |
*/
|
|
36 |
public final class GameConfig {
|
|
37 |
public static final String DEFAULT_STYLE = "Normal";
|
|
38 |
public static final String DEFAULT_SCHEME = "Default";
|
|
39 |
public static final String DEFAULT_WEAPONSET = "Default";
|
|
40 |
|
|
41 |
public final String style;
|
|
42 |
public final Scheme scheme;
|
|
43 |
public final MapRecipe map;
|
|
44 |
public final List<TeamInGame> teams;
|
|
45 |
public final Weaponset weaponset;
|
|
46 |
|
|
47 |
public GameConfig(String style, Scheme scheme, MapRecipe map, List<TeamInGame> teams, Weaponset weaponset) {
|
|
48 |
this.style = style;
|
|
49 |
this.scheme = scheme;
|
|
50 |
this.map = map;
|
|
51 |
this.teams = Collections.unmodifiableList(new ArrayList<TeamInGame>(teams));
|
|
52 |
this.weaponset = weaponset;
|
|
53 |
}
|
|
54 |
}
|