diff -r d70a5b0d1190 -r 0481bd74267c project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/GameConfig.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/GameConfig.java Sun Aug 12 22:46:23 2012 +0200 @@ -0,0 +1,54 @@ +/* + * Hedgewars for Android. An Android port of Hedgewars, a free turn based strategy game + * Copyright (c) 2011-2012 Richard Deurwaarder + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + +package org.hedgewars.hedgeroid.Datastructures; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + + +/** + * Game configuration from the point of view of the UI. This differs slightly from the + * frontlib view, because the engine allows setting a separate initial health and weapon set + * for each hog, while the Android UI currently only supports both attributes on a per-game + * basis (initial health is contained in the scheme). + * + * This difference means that creating a GameConfig object from a frontlib object can, in + * theory, lose information. This does not cause problems at the moment because for now + * weaponset and initial health are always per-game, but that might change in the future. + */ +public final class GameConfig { + public static final String DEFAULT_STYLE = "Normal"; + public static final String DEFAULT_SCHEME = "Default"; + public static final String DEFAULT_WEAPONSET = "Default"; + + public final String style; + public final Scheme scheme; + public final MapRecipe map; + public final List teams; + public final Weaponset weaponset; + + public GameConfig(String style, Scheme scheme, MapRecipe map, List teams, Weaponset weaponset) { + this.style = style; + this.scheme = scheme; + this.map = map; + this.teams = Collections.unmodifiableList(new ArrayList(teams)); + this.weaponset = weaponset; + } +}