text:
package com.kings.model.factory;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

import com.kings.model.CityVill;
import com.kings.model.CombatType;
import com.kings.model.Creature;
import com.kings.model.Fort;
import com.kings.model.GamePiece;
import com.kings.model.GameState;
import com.kings.model.HexLocation;
import com.kings.model.HexTile;
import com.kings.model.MagicItem;
import com.kings.model.NonCityVill;
import com.kings.model.Player;
import com.kings.model.PlayingCup;
import com.kings.model.RandomEvent;
import com.kings.model.SideLocation;
import com.kings.model.SpecialAbility;
import com.kings.model.SpecialCharacter;
import com.kings.model.Terrain;
import com.kings.model.Treasure;

/**
 * This class populates a given GameState object with all needed objects,
 * pieces, etc. for playing a game
 *
 * @author devinlynch
 *
 */
public class GameStateFactory {

	public static GameState makeGameState(GameState gameState, int numberOfPlayers) throws Exception {
		if (numberOfPlayers < 1 || numberOfPlayers > 4)
			throw new Exception("Number of players must be between 2 and 4");

		boolean is23PlayerGame = numberOfPlayers < 4;
		int numTiles = 37;
		if (is23PlayerGame && !gameState.isDemo()) {
			numTiles = 19;
		}

		addHexLocations(gameState, numTiles);
		addPiecesToDefaultLocations(gameState);
		assignDefaultGamePiecesAndGoldToPlayers(gameState);

		if (gameState.isDemo()) {
			setHexTilesOnLocationsForDemo2(gameState);
			handleDemo2Settings(gameState);
		} else
			setRandomHexTiles(gameState, numTiles);

		switch (numberOfPlayers) {
		case 2: {
		}
		case 3: {
		}
		case 4: {

		}
		}

		return gameState;
	}

	public static void setRandomHexTiles(GameState gameState, int numTiles) {
		List<HexTile> tiles = new ArrayList<HexTile>(gameState.getSideLocation().getHexTiles());
		Collections.shuffle(tiles);

		for (int i = 0; i <= (numTiles - 1); i++) {
			HexLocation loc = gameState.getHexlocations().get(i);

			int z = 0;
			while (true) {
				if (z >= tiles.size())
					break;

				HexTile tile = tiles.get(z);

				if (tile.getTerrain() != null && tile.getTerrain().getId().equals(Terrain.SEA_TERRAIN.getId())) {
					List<HexLocation> surrounding = gameState.getSurroundingHexLocations(loc);
					if (loc.isStartingLocation(gameState) || anyLocationContainSea(surrounding)) {
						z++;
						continue;
					}
				}

				tiles.remove(z);
				loc.setHexTile(tile);
				break;
			}
		}
	}

	public static boolean anyLocationContainSea(List<HexLocation> locs) {
		for (HexLocation l : locs) {
			if (hasSeaOnit(l)) {
				return true;
			}
		}
		return false;
	}

	public static boolean hasSeaOnit(HexLocation l) {
		return l.getHexTile() != null && l.getHexTile().getTerrain() != null && l.getHexTile().getTerrain().getId().equals(Terrain.SEA_TERRAIN.getId());
	}

	public static void setHexTilesOnLocationsForDemo(GameState gameState) {
		gameState.getHexlocations().get(0).setHexTile((HexTile) gameState.getGamePiece("frozen-tile-01"));
		gameState.getHexlocations().get(1).setHexTile((HexTile) gameState.getGamePiece("forest-tile-01"));
		gameState.getHexlocations().get(2).setHexTile((HexTile) gameState.getGamePiece("jungle-tile-01"));
		gameState.getHexlocations().get(3).setHexTile((HexTile) gameState.getGamePiece("plains-tile-01"));
		gameState.getHexlocations().get(4).setHexTile((HexTile) gameState.getGamePiece("sea-tile-01"));
		gameState.getHexlocations().get(5).setHexTile((HexTile) gameState.getGamePiece("forest-tile-02"));
		gameState.getHexlocations().get(6).setHexTile((HexTile) gameState.getGamePiece("swamp-tile-01"));
		gameState.getHexlocations().get(7).setHexTile((HexTile) gameState.getGamePiece("plains-tile-02"));
		gameState.getHexlocations().get(8).setHexTile((HexTile) gameState.getGamePiece("frozen-tile-02"));
		gameState.getHexlocations().get(9).setHexTile((HexTile) gameState.getGamePiece("mountain-tile-01"));
		gameState.getHexlocations().get(10).setHexTile((HexTile) gameState.getGamePiece("forest-tile-03"));
		gameState.getHexlocations().get(11).setHexTile((HexTile) gameState.getGamePiece("swamp-tile-02"));
		gameState.getHexlocations().get(12).setHexTile((HexTile) gameState.getGamePiece("desert-tile-01"));
		gameState.getHexlocations().get(13).setHexTile((HexTile) gameState.getGamePiece("swamp-tile-03"));
		gameState.getHexlocations().get(14).setHexTile((HexTile) gameState.getGamePiece("forest-tile-04"));
		gameState.getHexlocations().get(15).setHexTile((HexTile) gameState.getGamePiece("desert-tile-02"));
		gameState.getHexlocations().get(16).setHexTile((HexTile) gameState.getGamePiece("plains-tile-03"));
		gameState.getHexlocations().get(17).setHexTile((HexTile) gameState.getGamePiece("mountain-tile-02"));
		gameState.getHexlocations().get(18).setHexTile((HexTile) gameState.getGamePiece("jungle-tile-02"));
		gameState.getHexlocations().get(19).setHexTile((HexTile) gameState.getGamePiece("swamp-tile-04"));
		gameState.getHexlocations().get(20).setHexTile((HexTile) gameState.getGamePiece("mountain-tile-03"));
		gameState.getHexlocations().get(21).setHexTile((HexTile) gameState.getGamePiece("jungle-tile-03"));
		gameState.getHexlocations().get(22).setHexTile((HexTile) gameState.getGamePiece("swamp-tile-05"));
		gameState.getHexlocations().get(23).setHexTile((HexTile) gameState.getGamePiece("desert-tile-03"));
		gameState.getHexlocations().get(24).setHexTile((HexTile) gameState.getGamePiece("forest-tile-05"));
		gameState.getHexlocations().get(25).setHexTile((HexTile) gameState.getGamePiece("plains-tile-04"));
		gameState.getHexlocations().get(26).setHexTile((HexTile) gameState.getGamePiece("forest-tile-06"));
		gameState.getHexlocations().get(27).setHexTile((HexTile) gameState.getGamePiece("frozen-tile-04"));
		gameState.getHexlocations().get(28).setHexTile((HexTile) gameState.getGamePiece("jungle-tile-05"));
		gameState.getHexlocations().get(29).setHexTile((HexTile) gameState.getGamePiece("mountain-tile-04"));
		gameState.getHexlocations().get(30).setHexTile((HexTile) gameState.getGamePiece("desert-tile-04"));
		gameState.getHexlocations().get(31).setHexTile((HexTile) gameState.getGamePiece("plains-tile-05"));
		gameState.getHexlocations().get(32).setHexTile((HexTile) gameState.getGamePiece("jungle-tile-04"));
		gameState.getHexlocations().get(33).setHexTile((HexTile) gameState.getGamePiece("mountain-tile-05"));
		gameState.getHexlocations().get(34).setHexTile((HexTile) gameState.getGamePiece("forest-tile-06"));
		gameState.getHexlocations().get(35).setHexTile((HexTile) gameState.getGamePiece("frozen-tile-05"));
		gameState.getHexlocations().get(36).setHexTile((HexTile) gameState.getGamePiece("desert-tile-05"));
	}

	public static void setHexTilesOnLocationsForDemo2(GameState gameState) {
		gameState.getHexlocations().get(0).setHexTile((HexTile) gameState.getGamePiece("swamp-tile-01"));
		gameState.getHexlocations().get(1).setHexTile((HexTile) gameState.getGamePiece("sea-tile-01"));
		gameState.getHexlocations().get(2).setHexTile((HexTile) gameState.getGamePiece("plains-tile-01"));
		gameState.getHexlocations().get(3).setHexTile((HexTile) gameState.getGamePiece("frozen-tile-01"));
		gameState.getHexlocations().get(4).setHexTile((HexTile) gameState.getGamePiece("desert-tile-01"));
		gameState.getHexlocations().get(5).setHexTile((HexTile) gameState.getGamePiece("forest-tile-01"));
		gameState.getHexlocations().get(6).setHexTile((HexTile) gameState.getGamePiece("mountain-tile-01"));
		gameState.getHexlocations().get(7).setHexTile((HexTile) gameState.getGamePiece("desert-tile-02"));
		gameState.getHexlocations().get(8).setHexTile((HexTile) gameState.getGamePiece("swamp-tile-02"));
		gameState.getHexlocations().get(9).setHexTile((HexTile) gameState.getGamePiece("mountain-tile-02"));
		gameState.getHexlocations().get(10).setHexTile((HexTile) gameState.getGamePiece("forest-tile-02"));
		gameState.getHexlocations().get(11).setHexTile((HexTile) gameState.getGamePiece("desert-tile-03"));
		gameState.getHexlocations().get(12).setHexTile((HexTile) gameState.getGamePiece("forest-tile-03"));
		gameState.getHexlocations().get(13).setHexTile((HexTile) gameState.getGamePiece("forest-tile-04"));
		gameState.getHexlocations().get(14).setHexTile((HexTile) gameState.getGamePiece("mountain-tile-03"));
		gameState.getHexlocations().get(15).setHexTile((HexTile) gameState.getGamePiece("plains-tile-02"));
		gameState.getHexlocations().get(16).setHexTile((HexTile) gameState.getGamePiece("sea-tile-02"));
		gameState.getHexlocations().get(17).setHexTile((HexTile) gameState.getGamePiece("mountain-tile-04"));
		gameState.getHexlocations().get(18).setHexTile((HexTile) gameState.getGamePiece("frozen-tile-02"));
		gameState.getHexlocations().get(19).setHexTile((HexTile) gameState.getGamePiece("swamp-tile-03"));
		gameState.getHexlocations().get(20).setHexTile((HexTile) gameState.getGamePiece("plains-tile-03"));
		gameState.getHexlocations().get(21).setHexTile((HexTile) gameState.getGamePiece("sea-tile-03"));
		gameState.getHexlocations().get(22).setHexTile((HexTile) gameState.getGamePiece("jungle-tile-01"));
		gameState.getHexlocations().get(23).setHexTile((HexTile) gameState.getGamePiece("frozen-tile-03"));
		gameState.getHexlocations().get(24).setHexTile((HexTile) gameState.getGamePiece("plains-tile-04"));
		gameState.getHexlocations().get(25).setHexTile((HexTile) gameState.getGamePiece("frozen-tile-04"));
		gameState.getHexlocations().get(26).setHexTile((HexTile) gameState.getGamePiece("swamp-tile-04"));
		gameState.getHexlocations().get(27).setHexTile((HexTile) gameState.getGamePiece("desert-tile-04"));
		gameState.getHexlocations().get(28).setHexTile((HexTile) gameState.getGamePiece("desert-tile-05"));
		gameState.getHexlocations().get(29).setHexTile((HexTile) gameState.getGamePiece("frozen-tile-05"));
		gameState.getHexlocations().get(30).setHexTile((HexTile) gameState.getGamePiece("mountain-tile-05"));
		gameState.getHexlocations().get(31).setHexTile((HexTile) gameState.getGamePiece("forest-tile-05"));
		gameState.getHexlocations().get(32).setHexTile((HexTile) gameState.getGamePiece("swamp-tile-05"));
		gameState.getHexlocations().get(33).setHexTile((HexTile) gameState.getGamePiece("sea-tile-04"));
		gameState.getHexlocations().get(34).setHexTile((HexTile) gameState.getGamePiece("swamp-tile-06"));
		gameState.getHexlocations().get(35).setHexTile((HexTile) gameState.getGamePiece("forest-tile-06"));
		gameState.getHexlocations().get(36).setHexTile((HexTile) gameState.getGamePiece("plains-tile-05"));
	}

	public static void handleDemo2Settings(GameState gameState) {
		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(0).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(0).capture(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(0).addGamePieceToLocation(gameState.getGamePiece("Fort_02-01"));
			gameState.getPlayerByPlayerId("player1").assignGamePieceToPlayer(gameState.getGamePiece("Fort_02-01"));
		}

		// gameState.getHexlocations().get(1).setOwner(gameState.getPlayerByPlayerId("player1"));
		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(2).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(2).capture(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(2).addGamePieceToLocation(gameState.getGamePiece("Fort_01-01"));
			gameState.getPlayerByPlayerId("player1").assignGamePieceToPlayer(gameState.getGamePiece("Fort_01-01"));
			Set<GamePiece> stackPieces = new HashSet<GamePiece>();
			stackPieces.add(gameState.getGamePiece("T_Jungle_005-01"));
			stackPieces.add(gameState.getGamePiece("T_Mountains_034-01"));
			stackPieces.add(gameState.getGamePiece("T_Desert_114-01"));
			stackPieces.add(gameState.getGamePiece("T_Desert_115-01"));
			stackPieces.add(gameState.getGamePiece("T_Forest_100-01"));
			stackPieces.add(gameState.getGamePiece("T_Plains_014-01"));
			stackPieces.add(gameState.getGamePiece("T_Frozen_Waste_054-01"));
			stackPieces.add(gameState.getGamePiece("T_Frozen_Waste_063-01"));
			stackPieces.add(gameState.getGamePiece("T_Frozen_Waste_058-01"));
			stackPieces.add(gameState.getGamePiece("T_Jungle_004-01"));
			gameState.getHexlocations().get(2).createAndAddNewStackWithPieces(gameState.getPlayerByPlayerId("player1"), stackPieces);
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(3).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(3).capture(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(3).addGamePieceToLocation(gameState.getGamePiece("Fort_01-02"));
			gameState.getPlayerByPlayerId("player2").assignGamePieceToPlayer(gameState.getGamePiece("Fort_01-02"));
			Set<GamePiece> stackPieces = new HashSet<GamePiece>();
			stackPieces.add(gameState.getGamePiece("T_Swamp_066-01"));
			stackPieces.add(gameState.getGamePiece("T_Swamp_076-01"));
			stackPieces.add(gameState.getGamePiece("T_Swamp_083-01"));
			stackPieces.add(gameState.getGamePiece("T_Forest_090-01"));
			stackPieces.add(gameState.getGamePiece("T_Forest_087-01"));
			stackPieces.add(gameState.getGamePiece("T_Desert_113-01"));
			stackPieces.add(gameState.getGamePiece("T_Desert_117-01"));
			stackPieces.add(gameState.getGamePiece("T_Swamp_080-01"));
			stackPieces.add(gameState.getGamePiece("T_Desert_108-01"));
			stackPieces.add(gameState.getGamePiece("T_Forest_101-01"));
			gameState.getHexlocations().get(3).createAndAddNewStackWithPieces(gameState.getPlayerByPlayerId("player2"), stackPieces);
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(4).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(4).capture(gameState.getPlayerByPlayerId("player2"));
		}

		if (gameState.getPlayerByPlayerId("player3") != null) {
			gameState.getHexlocations().get(5).setOwner(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(5).capture(gameState.getPlayerByPlayerId("player3"));
		}

		// gameState.getHexlocations().get(6).setOwner(gameState.getPlayerByPlayerId("player1"));

		if (gameState.getPlayerByPlayerId("player4") != null) {
			gameState.getHexlocations().get(7).setOwner(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(7).capture(gameState.getPlayerByPlayerId("player4"));
		}

		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(8).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(8).capture(gameState.getPlayerByPlayerId("player1"));
		}

		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(9).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(9).capture(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(9).addGamePieceToLocation(gameState.getGamePiece("Fort_03-01"));
			gameState.getGamePiece("Fort_03-01").setOwner(gameState.getPlayerByPlayerId("player1"));
		}

		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(10).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(10).capture(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(10).addGamePieceToLocation(gameState.getGamePiece("Fort_01-03"));
			gameState.getGamePiece("Fort_01-03").setOwner(gameState.getPlayerByPlayerId("player1"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(11).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(11).capture(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(11).addGamePieceToLocation(gameState.getGamePiece("Fort_02-02"));
			gameState.getPlayerByPlayerId("player2").assignGamePieceToPlayer(gameState.getGamePiece("Fort_02-02"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(12).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(12).capture(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(12).addGamePieceToLocation(gameState.getGamePiece("Fort_02-03"));
			gameState.getPlayerByPlayerId("player2").assignGamePieceToPlayer(gameState.getGamePiece("Fort_02-03"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(13).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(13).capture(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(13).addGamePieceToLocation(gameState.getGamePiece("Fort_03-02"));
			gameState.getGamePiece("Fort_03-02").setOwner(gameState.getPlayerByPlayerId("player2"));
		}

		if (gameState.getPlayerByPlayerId("player3") != null) {
			gameState.getHexlocations().get(14).setOwner(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(14).capture(gameState.getPlayerByPlayerId("player3"));
		}

		if (gameState.getPlayerByPlayerId("player3") != null) {
			gameState.getHexlocations().get(15).setOwner(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(15).capture(gameState.getPlayerByPlayerId("player3"));
		}

		// gameState.getHexlocations().get(16).setOwner(gameState.getPlayerByPlayerId("player1"));
		// gameState.getHexlocations().get(17).setOwner(gameState.getPlayerByPlayerId("player1"));

		if (gameState.getPlayerByPlayerId("player4") != null) {
			gameState.getHexlocations().get(18).setOwner(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(18).capture(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(18).addGamePieceToLocation(gameState.getGamePiece("Fort_01-04"));
			gameState.getGamePiece("Fort_01-04").setOwner(gameState.getPlayerByPlayerId("player4"));
		}

		if (gameState.getPlayerByPlayerId("player4") != null) {
			gameState.getHexlocations().get(19).setOwner(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(19).capture(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(19).addGamePieceToLocation(gameState.getGamePiece("Fort_03-03"));
			gameState.getGamePiece("Fort_03-03").setOwner(gameState.getPlayerByPlayerId("player4"));
		}

		if (gameState.getPlayerByPlayerId("player4") != null) {
			gameState.getHexlocations().get(20).setOwner(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(20).capture(gameState.getPlayerByPlayerId("player4"));
		}

		// gameState.getHexlocations().get(21).setOwner(gameState.getPlayerByPlayerId("player1"));

		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(22).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(22).capture(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(22).addGamePieceToLocation(gameState.getGamePiece("village_01"));
			gameState.getPlayerByPlayerId("player1").assignGamePieceToPlayer(gameState.getGamePiece("village_01"));
		}

		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(23).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(23).capture(gameState.getPlayerByPlayerId("player1"));
		}

		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(24).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(24).capture(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(24).addGamePieceToLocation(gameState.getGamePiece("Fort_03-03"));
			gameState.getGamePiece("Fort_03-03").setOwner(gameState.getPlayerByPlayerId("player1"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(25).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(25).capture(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(25).addGamePieceToLocation(gameState.getGamePiece("Fort_02-04"));
			gameState.getPlayerByPlayerId("player2").assignGamePieceToPlayer(gameState.getGamePiece("Fort_02-04"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(26).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(26).capture(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(26).addGamePieceToLocation(gameState.getGamePiece("village_02"));
			gameState.getPlayerByPlayerId("player2").assignGamePieceToPlayer(gameState.getGamePiece("village_02"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(27).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(27).capture(gameState.getPlayerByPlayerId("player2"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(28).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(28).capture(gameState.getPlayerByPlayerId("player2"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(29).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(29).capture(gameState.getPlayerByPlayerId("player2"));
		}

		if (gameState.getPlayerByPlayerId("player3") != null) {
			gameState.getHexlocations().get(30).setOwner(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(30).capture(gameState.getPlayerByPlayerId("player3"));
		}

		if (gameState.getPlayerByPlayerId("player3") != null) {
			gameState.getHexlocations().get(31).setOwner(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(31).capture(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(31).addGamePieceToLocation(gameState.getGamePiece("Fort_02-04"));
			gameState.getPlayerByPlayerId("player3").assignGamePieceToPlayer(gameState.getGamePiece("Fort_02-04"));
		}

		if (gameState.getPlayerByPlayerId("player3") != null) {
			gameState.getHexlocations().get(32).setOwner(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(32).capture(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(32).addGamePieceToLocation(gameState.getGamePiece("city_01"));
			gameState.getPlayerByPlayerId("player3").assignGamePieceToPlayer(gameState.getGamePiece("city_01"));
		}

		// gameState.getHexlocations().get(33).setOwner(gameState.getPlayerByPlayerId("player1"));

		if (gameState.getPlayerByPlayerId("player4") != null) {
			gameState.getHexlocations().get(34).setOwner(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(34).capture(gameState.getPlayerByPlayerId("player4"));
		}

		if (gameState.getPlayerByPlayerId("player4") != null) {
			gameState.getHexlocations().get(35).setOwner(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(35).capture(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(35).addGamePieceToLocation(gameState.getGamePiece("village_03"));
			gameState.getPlayerByPlayerId("player4").assignGamePieceToPlayer(gameState.getGamePiece("village_03"));
		}

		if (gameState.getPlayerByPlayerId("player4") != null) {
			gameState.getHexlocations().get(36).setOwner(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(36).capture(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(36).addGamePieceToLocation(gameState.getGamePiece("Fort_02-05"));
			gameState.getPlayerByPlayerId("player4").assignGamePieceToPlayer(gameState.getGamePiece("Fort_02-05"));
		}

	}

	public static void handleDemo3Settings(GameState gameState) {
		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(0).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(0).capture(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(0).addGamePieceToLocation(gameState.getGamePiece("Fort_02-01"));
			gameState.getPlayerByPlayerId("player1").assignGamePieceToPlayer(gameState.getGamePiece("Fort_02-01"));
		}

		// gameState.getHexlocations().get(1).setOwner(gameState.getPlayerByPlayerId("player1"));
		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(2).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(2).capture(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(2).addGamePieceToLocation(gameState.getGamePiece("Fort_01-01"));
			gameState.getPlayerByPlayerId("player1").assignGamePieceToPlayer(gameState.getGamePiece("Fort_01-01"));
			Set<GamePiece> stackPieces = new HashSet<GamePiece>();
			stackPieces.add(gameState.getGamePiece("T_Forest_102-01"));
			stackPieces.add(gameState.getGamePiece("T_Forest_094-01"));
			stackPieces.add(gameState.getGamePiece("T_Swamp_069-01"));
			stackPieces.add(gameState.getGamePiece("T_Desert_115-01"));
			stackPieces.add(gameState.getGamePiece("T_Forest_100-01"));
			stackPieces.add(gameState.getGamePiece("T_Plains_014-01"));
			stackPieces.add(gameState.getGamePiece("T_Frozen_Waste_054-01"));
			stackPieces.add(gameState.getGamePiece("T_Frozen_Waste_063-01"));
			stackPieces.add(gameState.getGamePiece("T_Swamp_081-01"));
			stackPieces.add(gameState.getGamePiece("T_Jungle_004-01"));
			gameState.getHexlocations().get(2).createAndAddNewStackWithPieces(gameState.getPlayerByPlayerId("player1"), stackPieces);
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(3).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(3).capture(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(3).addGamePieceToLocation(gameState.getGamePiece("Fort_01-02"));
			gameState.getPlayerByPlayerId("player2").assignGamePieceToPlayer(gameState.getGamePiece("Fort_01-02"));
			Set<GamePiece> stackPieces = new HashSet<GamePiece>();
			stackPieces.add(gameState.getGamePiece("T_Swamp_066-01"));
			stackPieces.add(gameState.getGamePiece("T_Swamp_076-01"));
			stackPieces.add(gameState.getGamePiece("T_Swamp_083-01"));
			stackPieces.add(gameState.getGamePiece("T_Forest_090-01"));
			stackPieces.add(gameState.getGamePiece("T_Forest_087-01"));
			stackPieces.add(gameState.getGamePiece("T_Desert_113-01"));
			stackPieces.add(gameState.getGamePiece("T_Desert_117-01"));
			stackPieces.add(gameState.getGamePiece("T_Swamp_080-01"));
			stackPieces.add(gameState.getGamePiece("T_Jungle_002-01"));
			stackPieces.add(gameState.getGamePiece("T_Jungle_007-01"));
			gameState.getHexlocations().get(3).createAndAddNewStackWithPieces(gameState.getPlayerByPlayerId("player2"), stackPieces);
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(4).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(4).capture(gameState.getPlayerByPlayerId("player2"));
		}

		if (gameState.getPlayerByPlayerId("player3") != null) {
			gameState.getHexlocations().get(5).setOwner(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(5).capture(gameState.getPlayerByPlayerId("player3"));
			Set<GamePiece> stackPieces = new HashSet<GamePiece>();
			stackPieces.add(gameState.getGamePiece("T_Forest_098-01"));
			stackPieces.add(gameState.getGamePiece("T_Forest_103-01"));
			stackPieces.add(gameState.getGamePiece("T_Forest_091-01"));
			stackPieces.add(gameState.getGamePiece("T_Forest_096-01"));
			gameState.getHexlocations().get(5).createAndAddNewStackWithPieces(gameState.getPlayerByPlayerId("player3"), stackPieces);
		}

		// gameState.getHexlocations().get(6).setOwner(gameState.getPlayerByPlayerId("player1"));

		if (gameState.getPlayerByPlayerId("player4") != null) {
			gameState.getHexlocations().get(7).setOwner(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(7).capture(gameState.getPlayerByPlayerId("player4"));
		}

		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(8).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(8).capture(gameState.getPlayerByPlayerId("player1"));
		}

		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(9).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(9).capture(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(9).addGamePieceToLocation(gameState.getGamePiece("Fort_03-01"));
			gameState.getGamePiece("Fort_03-01").setOwner(gameState.getPlayerByPlayerId("player1"));
		}

		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(10).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(10).capture(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(10).addGamePieceToLocation(gameState.getGamePiece("Fort_01-03"));
			gameState.getGamePiece("Fort_01-03").setOwner(gameState.getPlayerByPlayerId("player1"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(11).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(11).capture(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(11).addGamePieceToLocation(gameState.getGamePiece("Fort_02-02"));
			gameState.getPlayerByPlayerId("player2").assignGamePieceToPlayer(gameState.getGamePiece("Fort_02-02"));
			Set<GamePiece> stackPieces = new HashSet<GamePiece>();
			stackPieces.add(gameState.getGamePiece("T_Desert_116-02"));
			stackPieces.add(gameState.getGamePiece("T_Desert_108-02"));
			stackPieces.add(gameState.getGamePiece("T_Desert_114-02"));
			gameState.getHexlocations().get(11).createAndAddNewStackWithPieces(gameState.getPlayerByPlayerId("player2"), stackPieces);
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(12).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(12).capture(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(12).addGamePieceToLocation(gameState.getGamePiece("Fort_02-03"));
			gameState.getPlayerByPlayerId("player2").assignGamePieceToPlayer(gameState.getGamePiece("Fort_02-03"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(13).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(13).capture(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(13).addGamePieceToLocation(gameState.getGamePiece("Fort_03-02"));
			gameState.getGamePiece("Fort_03-02").setOwner(gameState.getPlayerByPlayerId("player2"));
		}

		if (gameState.getPlayerByPlayerId("player3") != null) {
			gameState.getHexlocations().get(14).setOwner(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(14).capture(gameState.getPlayerByPlayerId("player3"));
		}

		if (gameState.getPlayerByPlayerId("player3") != null) {
			gameState.getHexlocations().get(15).setOwner(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(15).capture(gameState.getPlayerByPlayerId("player3"));
		}

		// gameState.getHexlocations().get(16).setOwner(gameState.getPlayerByPlayerId("player1"));
		// gameState.getHexlocations().get(17).setOwner(gameState.getPlayerByPlayerId("player1"));

		if (gameState.getPlayerByPlayerId("player4") != null) {
			gameState.getHexlocations().get(18).setOwner(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(18).capture(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(18).addGamePieceToLocation(gameState.getGamePiece("Fort_01-04"));
			gameState.getGamePiece("Fort_01-04").setOwner(gameState.getPlayerByPlayerId("player4"));
		}

		if (gameState.getPlayerByPlayerId("player4") != null) {
			gameState.getHexlocations().get(19).setOwner(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(19).capture(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(19).addGamePieceToLocation(gameState.getGamePiece("Fort_03-03"));
			gameState.getGamePiece("Fort_03-03").setOwner(gameState.getPlayerByPlayerId("player4"));
		}

		if (gameState.getPlayerByPlayerId("player4") != null) {
			gameState.getHexlocations().get(20).setOwner(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(20).capture(gameState.getPlayerByPlayerId("player4"));
		}

		// gameState.getHexlocations().get(21).setOwner(gameState.getPlayerByPlayerId("player1"));

		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(22).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(22).capture(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(22).addGamePieceToLocation(gameState.getGamePiece("village_01"));
			gameState.getPlayerByPlayerId("player1").assignGamePieceToPlayer(gameState.getGamePiece("village_01"));
		}

		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(23).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(23).capture(gameState.getPlayerByPlayerId("player1"));
		}

		if (gameState.getPlayerByPlayerId("player1") != null) {
			gameState.getHexlocations().get(24).setOwner(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(24).capture(gameState.getPlayerByPlayerId("player1"));
			gameState.getHexlocations().get(24).addGamePieceToLocation(gameState.getGamePiece("Fort_03-03"));
			gameState.getGamePiece("Fort_03-03").setOwner(gameState.getPlayerByPlayerId("player1"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(25).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(25).capture(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(25).addGamePieceToLocation(gameState.getGamePiece("Fort_02-04"));
			gameState.getPlayerByPlayerId("player2").assignGamePieceToPlayer(gameState.getGamePiece("Fort_02-04"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(26).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(26).capture(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(26).addGamePieceToLocation(gameState.getGamePiece("village_02"));
			gameState.getPlayerByPlayerId("player2").assignGamePieceToPlayer(gameState.getGamePiece("village_02"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(27).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(27).capture(gameState.getPlayerByPlayerId("player2"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(28).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(28).capture(gameState.getPlayerByPlayerId("player2"));
		}

		if (gameState.getPlayerByPlayerId("player2") != null) {
			gameState.getHexlocations().get(29).setOwner(gameState.getPlayerByPlayerId("player2"));
			gameState.getHexlocations().get(29).capture(gameState.getPlayerByPlayerId("player2"));
		}

		if (gameState.getPlayerByPlayerId("player3") != null) {
			gameState.getHexlocations().get(30).setOwner(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(30).capture(gameState.getPlayerByPlayerId("player3"));
		}

		if (gameState.getPlayerByPlayerId("player3") != null) {
			gameState.getHexlocations().get(31).setOwner(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(31).capture(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(31).addGamePieceToLocation(gameState.getGamePiece("Fort_02-04"));
			gameState.getPlayerByPlayerId("player3").assignGamePieceToPlayer(gameState.getGamePiece("Fort_02-04"));
		}

		if (gameState.getPlayerByPlayerId("player3") != null) {
			gameState.getHexlocations().get(32).setOwner(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(32).capture(gameState.getPlayerByPlayerId("player3"));
			gameState.getHexlocations().get(32).addGamePieceToLocation(gameState.getGamePiece("city_01"));
			gameState.getPlayerByPlayerId("player3").assignGamePieceToPlayer(gameState.getGamePiece("city_01"));
		}

		// gameState.getHexlocations().get(33).setOwner(gameState.getPlayerByPlayerId("player1"));

		if (gameState.getPlayerByPlayerId("player4") != null) {
			gameState.getHexlocations().get(34).setOwner(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(34).capture(gameState.getPlayerByPlayerId("player4"));
		}

		if (gameState.getPlayerByPlayerId("player4") != null) {
			gameState.getHexlocations().get(35).setOwner(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(35).capture(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(35).addGamePieceToLocation(gameState.getGamePiece("village_03"));
			gameState.getPlayerByPlayerId("player4").assignGamePieceToPlayer(gameState.getGamePiece("village_03"));
		}

		if (gameState.getPlayerByPlayerId("player4") != null) {
			gameState.getHexlocations().get(36).setOwner(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(36).capture(gameState.getPlayerByPlayerId("player4"));
			gameState.getHexlocations().get(36).addGamePieceToLocation(gameState.getGamePiece("Fort_02-05"));
			gameState.getPlayerByPlayerId("player4").assignGamePieceToPlayer(gameState.getGamePiece("Fort_02-05"));
		}

	}

	public static void assignDefaultGamePiecesAndGoldToPlayers(GameState gameState) {
		Iterator<Player> it = gameState.getPlayers().iterator();
		int i = 1;
		while (it.hasNext()) {
			// Give fort
			Player player = it.next();
			String fortId = "Fort_01-0" + i;

			if (!gameState.isDemo()) {
				GamePiece fort = gameState.getGamePiece(fortId);
				player.assignGamePieceToPlayerRack(fort);
			}

			// Give gold
			gameState.getBank().payoutGoldToPlayer(10, player);

			if (gameState.isTestMode()) {
				givePredefinedPiecesToPlayer(player, 10, gameState);
			} else if (gameState.isDemo()) {
				// DO NOTHING
			} else {
				giveRandomPiecesToPlayer(player, 10, gameState);
			}
			i++;
		}
	}

	public static void giveRandomPiecesToPlayer(Player player, int numPieces, GameState gameState) {
		for (int i = 0; i < numPieces; i++) {
			GamePiece p = gameState.getPlayingCup().getAnyPiecExceptForts();
			player.assignGamePieceToPlayerRack(p);
		}
	}

	public static void givePredefinedPiecesToPlayer(Player player, int numPieces, GameState gameState) {
		// TODO this is only for demo! random creatures should be assigned

		if (player.getPlayerId().equals("player1")) {
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Desert_105-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Desert_115-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Jungle_001-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Mountains_037-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Mountains_043-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Mountains_047-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Desert_118-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Jungle_012-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Mountains_038-02"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Mountains_042-01"));
		} else if (player.getPlayerId().equals("player2")) {
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Jungle_002-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Desert_117-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Forest_097-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Desert_108-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Jungle_005-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Desert_114-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Forest_088-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Forest_098-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Jungle_003-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Forest_086-01"));
		} else if (player.getPlayerId().equals("player3")) {
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Plains_031-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Desert_113-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Plains_014-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Plains_014-02"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Desert_109-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Desert_118-02"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Jungle_008-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Plains_021-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Desert_114-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Jungle_006-01"));
		} else if (player.getPlayerId().equals("player4")) {
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Plains_027-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Swamp_076-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Plains_015-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Swamp_084-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Jungle_005-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Plains_027-02"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Forest_088-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Swamp_080-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Jungle_009-01"));
			player.assignGamePieceToPlayerRack(gameState.getGamePiece("T_Plains_016-01"));
		}

	}

	public static void addHexLocations(GameState gameState, int numHexes) {
		for (int i = 0; i < numHexes; i++) {
			HexLocation hex = new HexLocation("hexLocation_" + i, i);
			gameState.getHexlocations().add(hex);
			gameState.addBoardLocation(hex.getId(), hex);
		}
	}

	public static void addPiecesToDefaultLocations(GameState gameState) {
		Map<String, GamePiece> allGamePieces = new HashMap<String, GamePiece>();
		SideLocation side = gameState.getSideLocation();
		PlayingCup cup = gameState.getPlayingCup();

		// Counters defaulted to playing cup
		Map<String, GamePiece> playingCupPieces = getCountersDefaultedToPlayingCup();
		allGamePieces.putAll(playingCupPieces);
		cup.addGamePiecesToLocation(new HashSet<GamePiece>(playingCupPieces.values()));

		// Special Chars
		Map<String, SpecialCharacter> specialChars = getSpecialCharacterMap();
		allGamePieces.putAll(specialChars);
		side.addGamePiecesToLocation(new HashSet<GamePiece>(specialChars.values()));

		// Hex Tiles
		Map<String, HexTile> hexTiles = getHexTileMap();
		allGamePieces.putAll(hexTiles);
		side.addGamePiecesToLocation(new HashSet<GamePiece>(hexTiles.values()));

		gameState.setGamePieces(allGamePieces);
	}

	public static Set<GamePiece> getSpecialCharacters() {
		Set<GamePiece> tiles = new HashSet<GamePiece>();
		tiles.addAll(getSpecialCharacterMap().values());
		return tiles;
	}

	public static Set<GamePiece> getHexTiles() {
		Set<GamePiece> tiles = new HashSet<GamePiece>();
		tiles.addAll(getHexTileMap().values());
		return tiles;
	}

	public static Map<String, GamePiece> getCountersDefaultedToPlayingCup() {
		Map<String, GamePiece> counters = new HashMap<String, GamePiece>();

		counters.putAll(getFortMap());
		counters.putAll(getCreatureMap());
		counters.putAll(getTreasureMap());
		counters.putAll(getMagicItemMap());
		counters.putAll(getNonCityVillMap());
		counters.putAll(getCityVillMap());
		counters.putAll(getRandomEventMap());

		return counters;
	}

	public static Map<String, Fort> getFortMap() {
		// To get a citadel it costs 5 gold but you must have a castle and you
		// have more than 20 gold
		HashMap<String, Fort> map = new HashMap<String, Fort>();
		map.put("Fort_01-01", new Fort("Fort_01-01", "Tower", 1, 5, CombatType.MELEE));
		map.put("Fort_01-02", new Fort("Fort_01-02", "Tower", 1, 5, CombatType.MELEE));
		map.put("Fort_01-03", new Fort("Fort_01-03", "Tower", 1, 5, CombatType.MELEE));
		map.put("Fort_01-04", new Fort("Fort_01-04", "Tower", 1, 5, CombatType.MELEE));
		map.put("Fort_01-05", new Fort("Fort_01-05", "Tower", 1, 5, CombatType.MELEE));
		map.put("Fort_01-06", new Fort("Fort_01-06", "Tower", 1, 5, CombatType.MELEE));
		map.put("Fort_01-07", new Fort("Fort_01-07", "Tower", 1, 5, CombatType.MELEE));
		map.put("Fort_01-08", new Fort("Fort_01-08", "Tower", 1, 5, CombatType.MELEE));
		map.put("Fort_01-09", new Fort("Fort_01-09", "Tower", 1, 5, CombatType.MELEE));
		map.put("Fort_01-10", new Fort("Fort_01-10", "Tower", 1, 5, CombatType.MELEE));

		map.put("Fort_02-01", new Fort("Fort_02-01", "Keep", 2, 5, CombatType.MELEE));
		map.put("Fort_02-02", new Fort("Fort_02-02", "Keep", 2, 5, CombatType.MELEE));
		map.put("Fort_02-03", new Fort("Fort_02-03", "Keep", 2, 5, CombatType.MELEE));
		map.put("Fort_02-04", new Fort("Fort_02-04", "Keep", 2, 5, CombatType.MELEE));
		map.put("Fort_02-05", new Fort("Fort_02-05", "Keep", 2, 5, CombatType.MELEE));
		map.put("Fort_02-06", new Fort("Fort_02-06", "Keep", 2, 5, CombatType.MELEE));
		map.put("Fort_02-07", new Fort("Fort_02-07", "Keep", 2, 5, CombatType.MELEE));
		map.put("Fort_02-08", new Fort("Fort_02-08", "Keep", 2, 5, CombatType.MELEE));

		map.put("Fort_03-01", new Fort("Fort_03-01", "Castle", 3, 5, CombatType.RANGE));
		map.put("Fort_03-02", new Fort("Fort_03-02", "Castle", 3, 5, CombatType.RANGE));
		map.put("Fort_03-03", new Fort("Fort_03-03", "Castle", 3, 5, CombatType.RANGE));
		map.put("Fort_03-04", new Fort("Fort_03-04", "Castle", 3, 5, CombatType.RANGE));
		map.put("Fort_03-05", new Fort("Fort_03-05", "Castle", 3, 5, CombatType.RANGE));
		map.put("Fort_03-06", new Fort("Fort_03-06", "Castle", 3, 5, CombatType.RANGE));
		map.put("Fort_03-07", new Fort("Fort_03-07", "Castle", 3, 5, CombatType.RANGE));
		map.put("Fort_03-08", new Fort("Fort_03-08", "Castle", 3, 5, CombatType.RANGE));

		map.put("Fort_04-01", new Fort("Fort_04-01", "Citadel", 4, 5, CombatType.MAGIC));
		map.put("Fort_04-02", new Fort("Fort_04-02", "Citadel", 4, 5, CombatType.MAGIC));
		map.put("Fort_04-03", new Fort("Fort_04-03", "Citadel", 4, 5, CombatType.MAGIC));
		map.put("Fort_04-04", new Fort("Fort_04-04", "Citadel", 4, 5, CombatType.MAGIC));
		map.put("Fort_04-05", new Fort("Fort_04-05", "Citadel", 4, 5, CombatType.MAGIC));
		map.put("Fort_04-06", new Fort("Fort_04-06", "Citadel", 4, 5, CombatType.MAGIC));
		return map;
	}

	public static Map<String, Creature> getCreatureMap() {
		HashMap<String, Creature> map = new HashMap<String, Creature>();
		map.put("T_Desert_105-01", new Creature("T_Desert_105-01", "AlterDrache", CombatType.MAGIC, 4, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_106-01", new Creature("T_Desert_106-01", "Babydrache", CombatType.MELEE, 3, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_107-01", new Creature("T_Desert_107-01", "Bussard", CombatType.MELEE, 1, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_108-01", new Creature("T_Desert_108-01", "Derwisch", CombatType.MAGIC, 2, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_108-02", new Creature("T_Desert_108-02", "Derwisch2", CombatType.MAGIC, 2, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_109-01", new Creature("T_Desert_109-01", "Dschinn", CombatType.MAGIC, 4, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_110-01", new Creature("T_Desert_110-01", "Geier", CombatType.MELEE, 1, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_111-01", new Creature("T_Desert_111-01", "GelberRitter", CombatType.MELEE, 3, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_112-01", new Creature("T_Desert_112-01", "Greif", CombatType.MELEE, 2, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_113-01", new Creature("T_Desert_113-01", "Kamelreiter", CombatType.MELEE, 3, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_114-01", new Creature("T_Desert_114-01", "Nomade", CombatType.MELEE, 1, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_114-02", new Creature("T_Desert_114-02", "Nomade2", CombatType.MELEE, 1, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_115-01", new Creature("T_Desert_115-01", "Riesenspinne", CombatType.MELEE, 1, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_116-01", new Creature("T_Desert_116-01", "Riesenwespe", CombatType.MELEE, 4, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_116-02", new Creature("T_Desert_116-02", "Riesenwespe2", CombatType.MELEE, 4, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_117-01", new Creature("T_Desert_117-01", "Sandwurm", CombatType.MELEE, 3, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_118-01", new Creature("T_Desert_118-01", "Skelett", CombatType.MELEE, 1, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_118-02", new Creature("T_Desert_118-02", "Skelett2", CombatType.MELEE, 1, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_119-01", new Creature("T_Desert_119-01", "Sphinx", CombatType.MAGIC, 4, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_120-01", new Creature("T_Desert_120-01", "Staubteufel", CombatType.MELEE, 4, Terrain.DESERT_TERRAIN));
		map.put("T_Desert_122-01", new Creature("T_Desert_122-01", "W�stenfledermaus", CombatType.MELEE, 1, Terrain.DESERT_TERRAIN));
		map.put("T_Forest_086-01", new Creature("T_Forest_086-01", "Banditen", CombatType.MELEE, 2, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_087-01", new Creature("T_Forest_087-01", "B�ren", CombatType.MELEE, 2, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_088-01", new Creature("T_Forest_088-01", "Druide", CombatType.MAGIC, 3, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_089-01", new Creature("T_Forest_089-01", "Dryade", CombatType.MAGIC, 1, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_090-01", new Creature("T_Forest_090-01", "Einhorn", CombatType.MELEE, 4, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_091-01", new Creature("T_Forest_091-01", "Elf", CombatType.RANGE, 2, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_091-02", new Creature("T_Forest_091-02", "Elf2", CombatType.RANGE, 2, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_092-01", new Creature("T_Forest_092-01", "Elf3", CombatType.RANGE, 3, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_093-01", new Creature("T_Forest_093-01", "Elfenmagier", CombatType.MAGIC, 2, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_094-01", new Creature("T_Forest_094-01", "Flugeichh�rnchen", CombatType.MELEE, 2, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_095-01", new Creature("T_Forest_095-01", "Flugeichh�rnchen2", CombatType.MELEE, 1, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_096-01", new Creature("T_Forest_096-01", "Gro�eule", CombatType.MELEE, 4, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_097-01", new Creature("T_Forest_097-01", "Gr�nerRitter", CombatType.MELEE, 4, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_098-01", new Creature("T_Forest_098-01", "Laufbaum", CombatType.MELEE, 5, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_099-01", new Creature("T_Forest_099-01", "Lindwurm", CombatType.MELEE, 3, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_100-01", new Creature("T_Forest_100-01", "M�rderwaschb�r", CombatType.MELEE, 2, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_101-01", new Creature("T_Forest_101-01", "Waldl�ufer", CombatType.RANGE, 2, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_102-01", new Creature("T_Forest_102-01", "Wichtelmann", CombatType.MELEE, 1, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_102-02", new Creature("T_Forest_102-02", "Wichtelmann2", CombatType.MELEE, 1, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_103-01", new Creature("T_Forest_103-01", "Wildkatze", CombatType.MELEE, 2, Terrain.FOREST_TERRAIN));
		map.put("T_Forest_104-01", new Creature("T_Forest_104-01", "Yeti", CombatType.MELEE, 5, Terrain.FOREST_TERRAIN));
		map.put("T_Frozen_Waste_051-01", new Creature("T_Frozen_Waste_051-01", "Drachenreiter", CombatType.RANGE, 3, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_052-01", new Creature("T_Frozen_Waste_052-01", "Eisb�r", CombatType.MELEE, 4, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_053-01", new Creature("T_Frozen_Waste_053-01", "Eisfledermaus", CombatType.MELEE, 1, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_054-01", new Creature("T_Frozen_Waste_054-01", "Eisriese", CombatType.RANGE, 5, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_055-01", new Creature("T_Frozen_Waste_055-01", "Eiswurm", CombatType.MAGIC, 4, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_056-01", new Creature("T_Frozen_Waste_056-01", "Elchherde", CombatType.MELEE, 2, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_057-01", new Creature("T_Frozen_Waste_057-01", "Eskimo", CombatType.MELEE, 2, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_057-02", new Creature("T_Frozen_Waste_057-02", "Eskimo2", CombatType.MELEE, 2, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_057-03", new Creature("T_Frozen_Waste_057-03", "Eskimo3", CombatType.MELEE, 2, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_057-04", new Creature("T_Frozen_Waste_057-04", "Eskimo4", CombatType.MELEE, 2, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_058-01", new Creature("T_Frozen_Waste_058-01", "Mammut", CombatType.MELEE, 5, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_059-01", new Creature("T_Frozen_Waste_059-01", "M�rderpapageientaucher", CombatType.MELEE, 2, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_060-01", new Creature("T_Frozen_Waste_060-01", "M�rderpinguin", CombatType.MELEE, 3, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_061-01", new Creature("T_Frozen_Waste_061-01", "Nordwind", CombatType.MAGIC, 2, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_062-01", new Creature("T_Frozen_Waste_062-01", "Walro�", CombatType.MELEE, 4, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_063-01", new Creature("T_Frozen_Waste_063-01", "Wei�erDrachen", CombatType.MAGIC, 5, Terrain.FROZEN_TERRAIN));
		map.put("T_Frozen_Waste_064-01", new Creature("T_Frozen_Waste_064-01", "Wolf", CombatType.MELEE, 3, Terrain.FROZEN_TERRAIN));
		map.put("T_Jungle_000-01", new Creature("T_Jungle_000-01", "Dinosaurier", CombatType.MELEE, 4, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_000-02", new Creature("T_Jungle_000-02", "Dinosaurier2", CombatType.MELEE, 4, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_001-01", new Creature("T_Jungle_001-01", "Elefant", CombatType.MELEE, 4, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_002-01", new Creature("T_Jungle_002-01", "Flugsaurierkrieger", CombatType.RANGE, 2, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_002-02", new Creature("T_Jungle_002-02", "Flugsaurierkrieger2", CombatType.RANGE, 2, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_003-01", new Creature("T_Jungle_003-01", "Kletterranken", CombatType.MELEE, 6, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_004-01", new Creature("T_Jungle_004-01", "Kopfj�ger", CombatType.RANGE, 2, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_005-01", new Creature("T_Jungle_005-01", "Krokodile", CombatType.MELEE, 2, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_006-01", new Creature("T_Jungle_006-01", "Medizinmann", CombatType.MAGIC, 2, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_007-01", new Creature("T_Jungle_007-01", "Paradiesvogel", CombatType.MELEE, 1, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_008-01", new Creature("T_Jungle_008-01", "Pygm�e", CombatType.MELEE, 2, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_009-01", new Creature("T_Jungle_009-01", "Riesenaffe", CombatType.MELEE, 5, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_009-02", new Creature("T_Jungle_009-02", "Riesenaffe2", CombatType.MELEE, 5, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_010-01", new Creature("T_Jungle_010-01", "Riesenschlange", CombatType.MELEE, 3, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_011-01", new Creature("T_Jungle_011-01", "Tiger", CombatType.MELEE, 3, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_011-02", new Creature("T_Jungle_011-02", "Tiger2", CombatType.MELEE, 3, Terrain.JUNGLE_TERRAIN));
		map.put("T_Jungle_012-01", new Creature("T_Jungle_012-01", "Watussi", CombatType.MELEE, 2, Terrain.JUNGLE_TERRAIN));
		map.put("T_Mountains_034-01", new Creature("T_Mountains_034-01", "Bergbewohner", CombatType.MELEE, 1, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_034-02", new Creature("T_Mountains_034-02", "Bergbewohner2", CombatType.MELEE, 1, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_035-01", new Creature("T_Mountains_035-01", "Bergl�we", CombatType.MELEE, 2, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_036-01", new Creature("T_Mountains_036-01", "BraunerDrache", CombatType.MELEE, 3, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_037-01", new Creature("T_Mountains_037-01", "BraunerRitter", CombatType.MELEE, 4, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_038-01", new Creature("T_Mountains_038-01", "Goblin", CombatType.MELEE, 1, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_038-02", new Creature("T_Mountains_038-02", "Goblin2", CombatType.MELEE, 1, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_038-03", new Creature("T_Mountains_038-03", "Goblin3", CombatType.MELEE, 1, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_038-04", new Creature("T_Mountains_038-04", "Goblin4", CombatType.MELEE, 1, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_039-01", new Creature("T_Mountains_039-01", "Gro�adler", CombatType.MELEE, 2, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_040-01", new Creature("T_Mountains_040-01", "Gro�falke", CombatType.MELEE, 1, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_041-01", new Creature("T_Mountains_041-01", "KleinerRockvogel", CombatType.MELEE, 2, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_042-01", new Creature("T_Mountains_042-01", "Oger", CombatType.MELEE, 2, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_043-01", new Creature("T_Mountains_043-01", "Riese", CombatType.RANGE, 4, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_044-01", new Creature("T_Mountains_044-01", "Riesenkondor", CombatType.MELEE, 3, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_045-01", new Creature("T_Mountains_045-01", "Riesenrockvogel", CombatType.MELEE, 3, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_046-01", new Creature("T_Mountains_046-01", "Troll", CombatType.MELEE, 4, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_047-01", new Creature("T_Mountains_047-01", "Zwerg", CombatType.RANGE, 2, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_048-01", new Creature("T_Mountains_048-01", "Zwerg2", CombatType.RANGE, 3, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_049-01", new Creature("T_Mountains_049-01", "Zwerg3", CombatType.MELEE, 3, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Mountains_050-01", new Creature("T_Mountains_050-01", "Zyklop", CombatType.MELEE, 5, Terrain.MOUNTAIN_TERRAIN));
		map.put("T_Plains_013-01", new Creature("T_Plains_013-01", "Adler", CombatType.MELEE, 2, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_014-01", new Creature("T_Plains_014-01", "Bauer", CombatType.MELEE, 1, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_014-02", new Creature("T_Plains_014-02", "Bauer2", CombatType.MELEE, 1, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_014-03", new Creature("T_Plains_014-03", "Bauer3", CombatType.MELEE, 1, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_014-04", new Creature("T_Plains_014-04", "Bauer4", CombatType.MELEE, 1, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_015-01", new Creature("T_Plains_015-01", "B�sewicht", CombatType.MELEE, 2, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_016-01", new Creature("T_Plains_016-01", "B�ffelherde", CombatType.MELEE, 3, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_017-01", new Creature("T_Plains_017-01", "B�ffelherde2", CombatType.MELEE, 4, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_018-01", new Creature("T_Plains_018-01", "Flugb�ffel", CombatType.MELEE, 2, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_019-01", new Creature("T_Plains_019-01", "Flugsaurier", CombatType.MELEE, 3, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_020-01", new Creature("T_Plains_020-01", "Gro�falke", CombatType.MELEE, 2, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_021-01", new Creature("T_Plains_021-01", "Gro�j�ger", CombatType.RANGE, 4, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_022-01", new Creature("T_Plains_022-01", "J�ger", CombatType.RANGE, 1, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_023-01", new Creature("T_Plains_023-01", "Libelle", CombatType.MELEE, 2, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_024-01", new Creature("T_Plains_024-01", "Pegasus", CombatType.MELEE, 2, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_025-01", new Creature("T_Plains_025-01", "Prachtl�we", CombatType.MELEE, 3, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_026-01", new Creature("T_Plains_026-01", "Riesenk�fer", CombatType.MELEE, 2, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_027-01", new Creature("T_Plains_027-01", "Stammeskrieger", CombatType.MELEE, 2, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_027-02", new Creature("T_Plains_027-02", "Stammeskrieger2", CombatType.MELEE, 2, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_028-01", new Creature("T_Plains_028-01", "Stammeskrieger3", CombatType.RANGE, 1, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_029-01", new Creature("T_Plains_029-01", "Wei�erRitter", CombatType.MELEE, 3, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_030-01", new Creature("T_Plains_030-01", "Wolfsmeute", CombatType.MELEE, 3, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_031-01", new Creature("T_Plains_031-01", "Zentaur", CombatType.MELEE, 2, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_032-01", new Creature("T_Plains_032-01", "Zigeuner", CombatType.MAGIC, 1, Terrain.PLAINS_TERRAIN));
		map.put("T_Plains_033-01", new Creature("T_Plains_033-01", "Zigeuner2", CombatType.MAGIC, 2, Terrain.PLAINS_TERRAIN));
		map.put("T_Swamp_065-01", new Creature("T_Swamp_065-01", "Basilisk", CombatType.MAGIC, 3, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_066-01", new Creature("T_Swamp_066-01", "Ding", CombatType.MELEE, 2, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_067-01", new Creature("T_Swamp_067-01", "Flugpiranha", CombatType.MELEE, 3, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_068-01", new Creature("T_Swamp_068-01", "Geist", CombatType.MAGIC, 2, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_069-01", new Creature("T_Swamp_069-01", "Gespenst", CombatType.MELEE, 1, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_069-02", new Creature("T_Swamp_069-02", "Gespenst2", CombatType.MELEE, 1, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_069-03", new Creature("T_Swamp_069-03", "Gespenst3", CombatType.MELEE, 1, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_069-04", new Creature("T_Swamp_069-04", "Gespenst4", CombatType.MELEE, 1, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_070-01", new Creature("T_Swamp_070-01", "Giftfrosch", CombatType.MELEE, 1, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_071-01", new Creature("T_Swamp_071-01", "Irrlicht", CombatType.MAGIC, 2, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_072-01", new Creature("T_Swamp_072-01", "Kobold", CombatType.MAGIC, 1, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_073-01", new Creature("T_Swamp_073-01", "Krokodile", CombatType.MELEE, 2, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_074-01", new Creature("T_Swamp_074-01", "Piraten", CombatType.MELEE, 2, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_075-01", new Creature("T_Swamp_075-01", "Riesenblutegel", CombatType.MELEE, 2, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_076-01", new Creature("T_Swamp_076-01", "Riesenechse", CombatType.MELEE, 2, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_076-02", new Creature("T_Swamp_076-02", "Riesenechse2", CombatType.MELEE, 2, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_077-01", new Creature("T_Swamp_077-01", "Riesenmoskito", CombatType.MELEE, 2, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_078-01", new Creature("T_Swamp_078-01", "Riesenschlange", CombatType.MELEE, 3, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_079-01", new Creature("T_Swamp_079-01", "Schleimbestie", CombatType.MELEE, 3, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_080-01", new Creature("T_Swamp_080-01", "SchwartzeRitter", CombatType.MELEE, 3, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_081-01", new Creature("T_Swamp_081-01", "Schwarzmagier", CombatType.MAGIC, 1, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_082-01", new Creature("T_Swamp_082-01", "Sumpfgas", CombatType.MELEE, 1, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_083-01", new Creature("T_Swamp_083-01", "Sumpfratte", CombatType.MELEE, 1, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_084-01", new Creature("T_Swamp_084-01", "Vampirfledermaus", CombatType.MELEE, 4, Terrain.SWAMP_TERRAIN));
		map.put("T_Swamp_085-01", new Creature("T_Swamp_085-01", "Wasserschlange", CombatType.MELEE, 1, Terrain.SWAMP_TERRAIN));
		return map;
	}

	public static Map<String, Treasure> getTreasureMap() {
		HashMap<String, Treasure> map = new HashMap<String, Treasure>();
		map.put("treasure_01-01", new Treasure("treasure_01-01", "treasureChest", 20));
		map.put("treasure_02-01", new Treasure("treasure_02-01", "ruby", 10));
		map.put("treasure_03-01", new Treasure("treasure_03-01", "sapphire", 5));
		map.put("treasure_04-01", new Treasure("treasure_04-01", "pearl", 5));
		map.put("treasure_05-01", new Treasure("treasure_05-01", "emerald", 10));
		map.put("treasure_06-01", new Treasure("treasure_06-01", "diamond", 5));
		return map;
	}

	public static Map<String, MagicItem> getMagicItemMap() {
		HashMap<String, MagicItem> map = new HashMap<String, MagicItem>();
		map.put("magic_01", new MagicItem("magic_01", "Abwehrstaub"));
		map.put("magic_02", new MagicItem("magic_02", "Ballon"));
		map.put("magic_03", new MagicItem("magic_03", "Blasebalg"));
		map.put("magic_04", new MagicItem("magic_04", "Elixier"));
		map.put("magic_05", new MagicItem("magic_05", "Feuerwand"));
		map.put("magic_06", new MagicItem("magic_06", "Glucksbringer"));
		map.put("magic_07", new MagicItem("magic_07", "Golem"));
		map.put("magic_08", new MagicItem("magic_08", "MagieBannen"));
		map.put("magic_09", new MagicItem("magic_09", "Talisman"));
		map.put("magic_10", new MagicItem("magic_10", "Zauberbogen"));
		map.put("magic_11", new MagicItem("magic_11", "Zauberschwert"));
		return map;
	}

	public static Map<String, CityVill> getCityVillMap() {
		HashMap<String, CityVill> map = new HashMap<String, CityVill>();
		map.put("city_01", new CityVill("city_01", "city", 2, 2));
		map.put("city_02", new CityVill("city_02", "city2", 2, 2));
		map.put("city_03", new CityVill("city_03", "city3", 2, 2));
		map.put("city_04", new CityVill("city_04", "city4", 2, 2));
		map.put("city_05", new CityVill("city_05", "city5", 2, 2));
		map.put("village_01", new CityVill("village_01", "village", 1, 1));
		map.put("village_02", new CityVill("village_02", "village2", 1, 1));
		map.put("village_03", new CityVill("village_03", "village3", 1, 1));
		map.put("village_04", new CityVill("village_04", "village4", 1, 1));
		map.put("village_05", new CityVill("village_05", "village5", 1, 1));
		return map;
	}

	public static Map<String, NonCityVill> getNonCityVillMap() {
		HashMap<String, NonCityVill> map = new HashMap<String, NonCityVill>();
		map.put("specialIncomeCounter_01-01", new NonCityVill("specialIncomeCounter_01-01", "timberland", 1, Terrain.FOREST_TERRAIN));// must
																																		// have
																																		// forest
																																		// to
																																		// get
																																		// gold
																																		// logic
																																		// later
																																		// added
		map.put("specialIncomeCounter_02-01", new NonCityVill("specialIncomeCounter_02-01", "oilField", 3, Terrain.FROZEN_TERRAIN)); // only
																																		// if
																																		// you
																																		// have
																																		// frozen
																																		// waste
																																		// to
																																		// get
																																		// gold
		map.put("specialIncomeCounter_03-01", new NonCityVill("specialIncomeCounter_03-01", "peatBog", 1, Terrain.SWAMP_TERRAIN)); // swamp
																																	// only
		map.put("specialIncomeCounter_04-01", new NonCityVill("specialIncomeCounter_04-01", "farmlands", 1, Terrain.PLAINS_TERRAIN)); // plains
																																		// only
		map.put("specialIncomeCounter_05-01", new NonCityVill("specialIncomeCounter_05-01", "goldMine", 3, Terrain.MOUNTAIN_TERRAIN)); // mountain
																																		// only
		map.put("specialIncomeCounter_06-01", new NonCityVill("specialIncomeCounter_06-01", "elephantGraveyard", 3, Terrain.JUNGLE_TERRAIN)); // jungle
																																				// only
		map.put("specialIncomeCounter_07-01", new NonCityVill("specialIncomeCounter_07-01", "diamondField", 1, Terrain.DESERT_TERRAIN)); // Desert
																																			// Only
		map.put("specialIncomeCounter_08-01", new NonCityVill("specialIncomeCounter_08-01", "copperMine", 1, Terrain.MOUNTAIN_TERRAIN)); // Mountain
																																			// Only
		map.put("specialIncomeCounter_09-01", new NonCityVill("specialIncomeCounter_09-01", "sliverMine", 2, Terrain.MOUNTAIN_TERRAIN));
		map.put("specialIncomeCounter_09-02", new NonCityVill("specialIncomeCounter_09-02", "sliverMine2", 2, Terrain.MOUNTAIN_TERRAIN));

		return map;

	}

	public static Map<String, RandomEvent> getRandomEventMap() {
		HashMap<String, RandomEvent> map = new HashMap<String, RandomEvent>();
		map.put("RandomEvent_01", new RandomEvent("RandomEvent_01", "bidJuJu"));
		map.put("RandomEvent_02", new RandomEvent("RandomEvent_02", "darkPlague"));
		map.put("RandomEvent_03", new RandomEvent("RandomEvent_03", "defection"));
		map.put("RandomEvent_04", new RandomEvent("RandomEvent_04", "goodHarvest"));
		map.put("RandomEvent_05", new RandomEvent("RandomEvent_05", "motherLode"));
		map.put("RandomEvent_06", new RandomEvent("RandomEvent_06", "teeniepox"));
		map.put("RandomEvent_07", new RandomEvent("RandomEvent_07", "terrainDisaster"));
		map.put("RandomEvent_08", new RandomEvent("RandomEvent_08", "vandals"));
		map.put("RandomEvent_09", new RandomEvent("RandomEvent_09", "weatherControl"));
		map.put("RandomEvent_10", new RandomEvent("RandomEvent_10", "willingWorkers"));
		return map;
	}

	public static Map<String, SpecialCharacter> getSpecialCharacterMap() {
		HashMap<String, SpecialCharacter> map = new HashMap<String, SpecialCharacter>();
		map.put("specialcharacter_01", new SpecialCharacter("specialcharacter_01", "Marksman", SpecialAbility.markmanCounter, 5, CombatType.RANGE));
		map.put("specialcharacter_02", new SpecialCharacter("specialcharacter_02", "SirLanceALot", SpecialAbility.markmanCounter, 5, CombatType.MELEE));
		map.put("specialcharacter_03", new SpecialCharacter("specialcharacter_03", "ArchMage", SpecialAbility.markmanCounter, 6, CombatType.MAGIC));
		map.put("specialcharacter_04", new SpecialCharacter("specialcharacter_04", "DwarfKing", SpecialAbility.markmanCounter, 5, CombatType.MELEE));
		map.put("specialcharacter_05", new SpecialCharacter("specialcharacter_05", "AssassinPrimus", SpecialAbility.eliminatecounterNocombat, 4, CombatType.MAGIC));
		map.put("specialcharacter_06", new SpecialCharacter("specialcharacter_06", "BaronMunchausen", SpecialAbility.markmanCounter, 4, CombatType.MELEE));
		map.put("specialcharacter_07", new SpecialCharacter("specialcharacter_07", "GrandDuke", SpecialAbility.markmanCounter, 4, CombatType.MELEE));
		map.put("specialcharacter_08", new SpecialCharacter("specialcharacter_08", "ElfLord", SpecialAbility.markmanCounter, 6, CombatType.RANGE));
		map.put("specialcharacter_09", new SpecialCharacter("specialcharacter_09", "MasterThief", SpecialAbility.masterCounterTheft, 4, CombatType.MELEE));
		map.put("specialcharacter_10", new SpecialCharacter("specialcharacter_10", "SwordMaster", SpecialAbility.swordElimnator, 4, CombatType.MELEE));
		map.put("specialcharacter_11", new SpecialCharacter("specialcharacter_11", "ArchCleric", SpecialAbility.markmanCounter, 5, CombatType.MAGIC));

		map.put("specialcharacter_12", new SpecialCharacter("specialcharacter_12", "DesertMaster", SpecialAbility.supportingTerrainLord, 4, CombatType.MELEE));
		map.put("specialcharacter_13", new SpecialCharacter("specialcharacter_13", "IceLord", SpecialAbility.supportingTerrainLord, 4, CombatType.MELEE));
		map.put("specialcharacter_14", new SpecialCharacter("specialcharacter_14", "JungleLord", SpecialAbility.supportingTerrainLord, 4, CombatType.MELEE));
		map.put("specialcharacter_15", new SpecialCharacter("specialcharacter_14", "ForestKing", SpecialAbility.supportingTerrainLord, 4, CombatType.MELEE));
		map.put("specialcharacter_16", new SpecialCharacter("specialcharacter_15", "PlainsLord", SpecialAbility.supportingTerrainLord, 4, CombatType.MELEE));
		map.put("specialcharacter_17", new SpecialCharacter("specialcharacter_17", "MountainKing", SpecialAbility.supportingTerrainLord, 4, CombatType.MELEE));
		map.put("specialcharacter_18", new SpecialCharacter("specialcharacter_18", "SwampMaster", SpecialAbility.supportingTerrainLord, 4, CombatType.MELEE));

		return map;
	}

	public static Map<String, HexTile> getHexTileMap() {
		HashMap<String, HexTile> map = new HashMap<String, HexTile>();
		map.put("desert-tile-01", new HexTile("desert-tile-01", "desertTile", Terrain.DESERT_TERRAIN));
		map.put("desert-tile-02", new HexTile("desert-tile-02", "desertTile", Terrain.DESERT_TERRAIN));
		map.put("desert-tile-03", new HexTile("desert-tile-03", "desertTile", Terrain.DESERT_TERRAIN));
		map.put("desert-tile-04", new HexTile("desert-tile-04", "desertTile", Terrain.DESERT_TERRAIN));
		map.put("desert-tile-05", new HexTile("desert-tile-05", "desertTile", Terrain.DESERT_TERRAIN));
		map.put("desert-tile-06", new HexTile("desert-tile-06", "desertTile", Terrain.DESERT_TERRAIN));

		map.put("forest-tile-01", new HexTile("forest-tile-01", "forestTile", Terrain.FOREST_TERRAIN));
		map.put("forest-tile-02", new HexTile("forest-tile-02", "forestTile", Terrain.FOREST_TERRAIN));
		map.put("forest-tile-03", new HexTile("forest-tile-03", "forestTile", Terrain.FOREST_TERRAIN));
		map.put("forest-tile-04", new HexTile("forest-tile-04", "forestTile", Terrain.FOREST_TERRAIN));
		map.put("forest-tile-05", new HexTile("forest-tile-05", "forestTile", Terrain.FOREST_TERRAIN));
		map.put("forest-tile-06", new HexTile("forest-tile-06", "forestTile", Terrain.FOREST_TERRAIN));
		map.put("forest-tile-07", new HexTile("forest-tile-07", "forestTile", Terrain.FOREST_TERRAIN));
		map.put("forest-tile-08", new HexTile("forest-tile-08", "forestTile", Terrain.FOREST_TERRAIN));
		map.put("forest-tile-09", new HexTile("forest-tile-09", "forestTile", Terrain.FOREST_TERRAIN));
		map.put("forest-tile-10", new HexTile("forest-tile-10", "forestTile", Terrain.FOREST_TERRAIN));

		map.put("frozen-tile-01", new HexTile("frozen-tile-01", "frozenTile", Terrain.FROZEN_TERRAIN));
		map.put("frozen-tile-02", new HexTile("frozen-tile-02", "frozenTile", Terrain.FROZEN_TERRAIN));
		map.put("frozen-tile-03", new HexTile("frozen-tile-03", "frozenTile", Terrain.FROZEN_TERRAIN));
		map.put("frozen-tile-04", new HexTile("frozen-tile-04", "frozenTile", Terrain.FROZEN_TERRAIN));
		map.put("frozen-tile-05", new HexTile("frozen-tile-05", "frozenTile", Terrain.FROZEN_TERRAIN));

		map.put("jungle-tile-01", new HexTile("jungle-tile-01", "jungleTile", Terrain.JUNGLE_TERRAIN));
		map.put("jungle-tile-02", new HexTile("jungle-tile-02", "jungleTile", Terrain.JUNGLE_TERRAIN));
		map.put("jungle-tile-03", new HexTile("jungle-tile-03", "jungleTile", Terrain.JUNGLE_TERRAIN));
		map.put("jungle-tile-04", new HexTile("jungle-tile-04", "jungleTile", Terrain.JUNGLE_TERRAIN));
		map.put("jungle-tile-05", new HexTile("jungle-tile-05", "jungleTile", Terrain.JUNGLE_TERRAIN));

		map.put("mountain-tile-01", new HexTile("mountain-tile-01", "mountainTile", Terrain.MOUNTAIN_TERRAIN));
		map.put("mountain-tile-02", new HexTile("mountain-tile-02", "mountainTile", Terrain.MOUNTAIN_TERRAIN));
		map.put("mountain-tile-03", new HexTile("mountain-tile-03", "mountainTile", Terrain.MOUNTAIN_TERRAIN));
		map.put("mountain-tile-04", new HexTile("mountain-tile-04", "mountainTile", Terrain.MOUNTAIN_TERRAIN));
		map.put("mountain-tile-05", new HexTile("mountain-tile-05", "mountainTile", Terrain.MOUNTAIN_TERRAIN));
		map.put("mountain-tile-06", new HexTile("mountain-tile-06", "mountainTile", Terrain.MOUNTAIN_TERRAIN));

		map.put("plains-tile-01", new HexTile("plains-tile-01", "plainsTile", Terrain.PLAINS_TERRAIN));
		map.put("plains-tile-02", new HexTile("plains-tile-02", "plainsTile", Terrain.PLAINS_TERRAIN));
		map.put("plains-tile-03", new HexTile("plains-tile-03", "plainsTile", Terrain.PLAINS_TERRAIN));
		map.put("plains-tile-04", new HexTile("plains-tile-04", "plainsTile", Terrain.PLAINS_TERRAIN));
		map.put("plains-tile-05", new HexTile("plains-tile-05", "plainsTile", Terrain.PLAINS_TERRAIN));
		map.put("plains-tile-06", new HexTile("plains-tile-06", "plainsTile", Terrain.PLAINS_TERRAIN));

		map.put("sea-tile-01", new HexTile("sea-tile-01", "seaTile", Terrain.SEA_TERRAIN));
		map.put("sea-tile-02", new HexTile("sea-tile-02", "seaTile", Terrain.SEA_TERRAIN));
		map.put("sea-tile-03", new HexTile("sea-tile-03", "seaTile", Terrain.SEA_TERRAIN));
		map.put("sea-tile-04", new HexTile("sea-tile-04", "seaTile", Terrain.SEA_TERRAIN));
		map.put("sea-tile-05", new HexTile("sea-tile-05", "seaTile", Terrain.SEA_TERRAIN));
		map.put("sea-tile-06", new HexTile("sea-tile-06", "seaTile", Terrain.SEA_TERRAIN));
		map.put("sea-tile-07", new HexTile("sea-tile-07", "seaTile", Terrain.SEA_TERRAIN));
		map.put("sea-tile-08", new HexTile("sea-tile-08", "seaTile", Terrain.SEA_TERRAIN));

		map.put("swamp-tile-01", new HexTile("swamp-tile-01", "swampTile", Terrain.SWAMP_TERRAIN));
		map.put("swamp-tile-02", new HexTile("swamp-tile-02", "swampTile", Terrain.SWAMP_TERRAIN));
		map.put("swamp-tile-03", new HexTile("swamp-tile-03", "swampTile", Terrain.SWAMP_TERRAIN));
		map.put("swamp-tile-04", new HexTile("swamp-tile-04", "swampTile", Terrain.SWAMP_TERRAIN));
		map.put("swamp-tile-05", new HexTile("swamp-tile-05", "swampTile", Terrain.SWAMP_TERRAIN));
		map.put("swamp-tile-06", new HexTile("swamp-tile-06", "swampTile", Terrain.SWAMP_TERRAIN));

		return map;
	}

}

redpajama_set_name: RedPajamaGithub


The Prime Minister is, of course, right.
We have a duty to remember. Commemorating an event is part of how a nation self-identifies – it is a clear statement of a nation's values and ideals. Commemorating the First World War centenary on the grand scale outlined by the Prime Minister is important. It reminds all of us that much of what we enjoy today has been so hard fought for, often at the heaviest of costs.
We also have a duty to learn from the past. One of the more salient lessons to be learned from the conflicts is how we best treat those soldiers who have survived combat. Frequently, the 'unknown' soldier is not the one who dies in conflict, but rather the one who returns.
Coming from a family where my father and my uncle have both served in the armed forces, I jumped at the recent chance to represent ABF The Soldiers' Charity, in a five-a-side tournament (my love of playing the beautiful game, of course having nothing to do with my decision…). In addition to enjoying a fantastic day of free-flowing total football, akin to that so wonderfully pioneered by the Dutch teams of the 1970s*, I was completely humbled to be surrounded by people whose job it is to make sure that this nation's servicemen and women are cared for in the manner that they deserve.
ABF The Soldiers' Charity – the national charity of the British Army since 1944, supports serving and retired soldiers and their families, working with veterans from every conflict since the Second World War, including veterans from recent conflicts in Iraq and Afghanistan. Whether a soldier has suffered life-changing physical or mental injuries, a former soldier is facing the daunting transition to a civilian career, or an elderly veteran can no longer fend for himself, The Soldiers Charity is on hand to provide support.
The Soldiers' Charity provides grants to soldiers and their families and to other specialist organisations that help the wider Army family. Last year the Charity made grants to 4,815 soldiers, former soldiers and their families who found themselves in urgent need, at a total cost of £3,562,000. The charity is currently experiencing a 21.5% increase in the number of those turning to it for help, meaning that in the coming year it will help some 5,850 individuals directly, and a great many more indirectly. The funding for this support, by the way, does not come from Government, but from generous donors and the hard work of the charity's fundraising team.
Whilst we are still fighting in Afghanistan, the media will ensure that service charities such as The Soldiers' Charity, and the servicemen and women it helps, are supported and remembered by the giving public. However history teaches us that following the conclusion of a conflict, when British troops have returned home, veterans charities fall out of the public consciousness. Their income declines, and consequently so does the support that they are able to offer our servicemen and women. The strains that servicemen and women suffer last long beyond their return from conflict, and so loss of income for charities dedicated to supporting them can be devastating.
The Prime Minister was right, it is our duty to remember; both those who return from conflict as well as those who do not. So let's ensure that we learn from the past and not allow amazing charities, such as The Soldiers' Charity, to slip from our minds.
*The Soldiers Charity dominated the group stage of the five-a-side competition, comfortably finding the net to record 3-2, 3-0 and 4-2 victories. We sailed into the quarter finals after seeing off second round opponents with another convincing 4-2 victory before falling in the quarterfinals in a close fought 1-2 loss to NSPCC. The game was billed by the event organisers as an early final, with predictions being that the winner of the game would win the entire tournament. These early predictions were well-founded, as NSPCC eventually lifted the trophy.


How does attitude affect the way service is delivered? In restaurants, you can tell if a waiter is in a sour mood—it will manifest itself in his service. If a waiter's service is competent, prompt, and amiable, you can tell that the waiter carries a brighter attitude. In other words, attitude is a part of what is served. There is no way to separate the two.
How do you respond emotionally to this statement? Do you feel yourself resist this notion, resent it, or demand that your spouse give "equal" service in return? If you identify with any of these, that's completely normal. These are common attitudes of someone who moves from being served to being a servant.
Resistance to being a servant usually comes from a place of misguided teaching, as when men are taught that it is biblical to dominate their wives into subordination. But this attitude is not gender specific. Anybody who has such expectations from their spouse is expecting to be served, not to serve.
Furthermore, this person is also still struggling with the two-becoming-one part of marriage. This means sacrificing one's own pride and sense of entitlement, eventually becoming one who serves instead of one who is served.
Resentment is also a common reaction to serving one's spouse. One would regard such service as "having to" complete menial tasks rather than "getting to" work for someone as lovely as one's spouse. In the initial stages, one begins to resent having to be a servant to the spouse. Then, it becomes resentment of the work required to serve one's spouse.
Finally, it festers into resentment of the spouse. This attitude is a toxic place to be: your spouse appears to you no longer as a subject of affection but as a source of endless tasks. Marriage is hard work. But approaching such work with the right attitude is essential to making marriages last.
The feeling of wanting service to be spread equally between both spouses is also a normal response. You might ask yourself, "If I do this much work, shouldn't my spouse do the same?" The truth is, there is no absolute fairness in the world. As a result, there is no way to quantify the service done for one's husband or wife. You cannot keep score of all the ways you both support the marriage.
Doing so will only lead to disrespect of one another's perceived shortcomings, also a cancer in any relationship. Marriage is not intended to be fair; it causes pain and inconvenience in order to teach you to love your spouse unselfishly. Therefore, you give as much as you can, and your spouse will reciprocate.
Acceptance of service almost never comes right away—it usually takes overcoming any of the above reactions. But when you eventually accept your duty to serve in marriage, you and your spouse will be in a much better marital state. Acceptance of my servitude to my wife, Lisa, has been a freeing experience that has taught me humility and grace. I hope it can do the same for you.


text:
SwansCast Episode 16 - Friday night the antithesis of a sensational season
Justin Mitchell's Picture
By Justin Mitchell | 19 September 2017 | 4 min read
Blog, Opinion, Podcast, Swanscast, Columnists
Good morning all, it's Tuesday and time for the latest instalment of The Swans Blog's podcast, the SwansCast. This week I'm joined by Rowan from BigFooty and we dissect the weekend that was.
The way the season ended on Friday night was tough to take, given the progress the team made throughout the season. It was a truly bizarre performance with so much going wrong.
On a night when the Swans were so heavily favoured to win and extend their stunning season revival, the result and performance was diametrically opposite from their recent form. It was so far removed that it stunned everyone. There wasn't any banter at the ground, none of the usual ribbing that opposition supporters give one another.
Geelong supporters were shocked and rightly so. They didn't exactly turn out in huge numbers, but 55 thousand watched the Cats upset the apple cart in stunning fashion. Speaking to Geelong supporters online and in person, most had resigned themselves to being on the receiving end, and wanted to cheer off Lonergan and Mackay. When they got on top they were quietly optimising and even at half time with the game looking as good as over, they didn't start celebrating.
I've spent a lot of time reflecting on what could have gone so wrong for a team to dish up a performance like that. I draw on my limited coaching knowledge when I think about it, and I draw several conclusions. The one thing that's clear is that they were mentally shot.
Geelong played the loose in defence, so the Swans went the extra at the contests, but the way they were moving the ball out wasn't working, and that extra had no impact. When they did get it, they just threw it on the boot without direction or looking, and even did it when they had time to hit up targets.
Nicholls did his best to level the game, giving them some ridiculous free kicks, including a shocking call to bring the ball back from advantage after they kicked a point - that isn't a rule. Dangerfield was giving Rampe all kinds of problems, but by the time the match was 20 minutes old the Swans were struggling to move the ball out of defence, while the Cats were getting all kinds of opportunities whenever they went forward.
There was a bit of "here we go again" late in the first quarter and the heads dropped. They came out at the start of the 2nd quarter like they'd never left the huddle, and in the blink of an eye the match was over. Having played 17 elimination finals in a row, the pressure to make the finals in the first place was enormous, let alone expectations of making it through to the preliminary final.
While a loss like that in isolation is extremely disappointing, it's not entirely surprising after a season like that. Making the finals after 0-6 was a historical achievement, but to then flog the Bombers and set a new AFL/VFL record in the process was amazing. Mrs blogs made a great point before the match that she'd rather lose the semi than the prelim, and rather lose the semi by a big margin than a small margin, so that the club, fans and media avoid the "hype".
She's right too, everyone's jumped off the Swans and the metaphorical monkey's are off their backs. There's the usual "he sucks in the finals" conversations on social media, BigFooty, Red & White and print media. Lloyd said yesterday that Rohan should never play another final. Slobbo said yesterday that Sydney's season is a failure. The vitriol directed at Franklin after the match calling him a failure with the Swans, all the usual rubbish that you get, even the call for Tippett to have played.
That match is done and gone, like a puff of dust in the books of history, and now we move on and look forward to season 2018. Significant progress was made in areas that needed it, despite several disappointing performances. After a shocking pre-season the fact the Swans turned it around is stunning itself. Just remember, no team ever made the finals after losing their first six games.
Anyway, make sure to stick with us during the off-season as we bring you all the latest Swans news and opinion content.
Brendan Weller, Heather Quinlan and Myles Stedman will be joining us as semi-regular contributors, while Brendan is running his ruler over the squad in a 3-part series. I've posted the first article in a 5-part series reviewing the season, so make sure you give that a read and relive the spectacular memories of the pre-season.
In this weeks' episode I'm joined by Rowan from BigFooty and we discuss the Swans' performance on Friday night, the weekends results, we look ahead to the grand final and run our rulers over the Swans' history making season.
We'll be back next week despite the Swans being out of the finals and we'll still be here after the grand final. We'll be taking it easy during the off-season, but we'll let you know before hand!
Download - Whooshkaa - iTunes - RSS - YouTube
Got a question, a comment? You can send us an email anytime throughout the week to swanscast@theswansblog.com, or drop us a line on Twitter, Facebook or Instagram using the hashtag #SwansCast.
Liked the show? If you would be so kind as to leave us a review or rating on iTunes, or subscribe, it would be greatly appreciated!
Enjoy the podcast and more to come throughout the week.
Like what you're getting? Want more Swans Blog, and the chance to have your input into our site and what we create? We have additional content weekly on our Patreon Service. This is your avenue, what are you waiting for? Sign up today and get more content like this.
If you'd like to support us, you can head over to our Red Bubble Swans Blog Shop, and purchase one of our hideously overpriced mugs, stickers or notebooks. Help keep The Swans Blog alive.
dismiss x
Since you're here...
... we have a small favour to ask. More people are reading The Swans Blog than ever, but we don't accept advertising, and don't want to do so in the future. Unlike many other news and media organisations, fan forums and fan media, we haven't put up a paywall, or displayed ads - we want to keep our content as open as possible.
The Swans Blog is an independent fan blog and community platform. Our content takes a lot of time and hard work to produce. We do it because we love what we do and we believe our perspective matters - because it may be your perspective too.
If everyone who reads our blog, who likes it, is supporting it, our future would be much more secure.
Make a one-off contribution →
Want instant access to the latest blog and news content from The Swans Blog?
Download our Android App from Google Play today.
Justin Mitchell
Justin is a passionate AFL and Sydney Swans supporter, and football blogger since 2016. All articles are of his own opinion. You can reach him by twitter and Facebook at @theswansblog
Melbourne, Australia http://theswansblog.com
Subscribe to The Swans Blog
or subscribe via RSS with Feedly!
Brendan's Sydney Swans 2017 player review, part 1
While everyone is going Cartman style banging doors and desks, lets try to reflect on this season as a…
Records tumble in Sydney Swans' sensational season
The Swans' 2017 campaign finally came to an end on Friday night, an antithesis ending to the sensational resurrection…

redpajama_set_name: RedPajamaCommonCrawl


text:
//=========================================================================
// FILENAME	: taguilts.h
// DESCRIPTION	: Header for tagutils.c
//=========================================================================
// Copyright (c) 2008- NETGEAR, Inc. All Rights Reserved.
//=========================================================================

/*
 * 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; either version 2 of the License, or
 * (at your option) any later version.
 *
 * 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, see <http://www.gnu.org/licenses/>.
 */

/*
 * This file is derived from mt-daap project.
 */

#ifndef _TAG_H_
#define _TAG_H_

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdint.h>
#include <libgen.h>

#define ROLE_NOUSE 0
#define ROLE_START 1
#define ROLE_ARTIST 1
#define ROLE_TRACKARTIST 2
#define ROLE_ALBUMARTIST 3
#define ROLE_BAND 4
#define ROLE_CONDUCTOR 5
#define ROLE_COMPOSER 6
#define ROLE_LAST 6
#define N_ROLE 7

struct song_metadata {
	int file_size;
	char *dirpath;
	char *path;
	char *basename;                         // basename is part of path
	char *type;
	int time_modified;

	uint8_t *image;                         // coverart
	int image_size;
	int image_type;				// APIC picture type

	char *title;                            // TIT2
	char *album;                            // TALB
	char *genre;                            // TCON
	char *comment;                          // COMM

	char *contributor[N_ROLE];              // TPE1  (artist)
						// TCOM  (composer)
						// TPE3  (conductor)
						// TPE2  (orchestra)
	char *contributor_sort[N_ROLE];

	char *grouping;                         // TIT1
	int year;                               // TDRC
	int track;                              // TRCK
	int total_tracks;                       // TRCK
	int disc;                               // TPOS
	int total_discs;                        // TPOS
	int bpm;                                // TBPM
	char compilation;                       // YTCP

	int bitrate;
	int max_bitrate;
	int samplerate;
	int samplesize;
	int channels;
	int song_length;                        // TLEN
	int audio_size;
	int audio_offset;
	int vbr_scale;
	int lossless;
	int blockalignment;

	char *mime;				// MIME type
	char *dlna_pn;				// DLNA Profile Name

	char *tagversion;

	unsigned long album_id;
	unsigned long track_id;
	unsigned long genre_id;
	unsigned long contributor_id[N_ROLE];

	char *musicbrainz_albumid;
	char *musicbrainz_trackid;
	char *musicbrainz_artistid;
	char *musicbrainz_albumartistid;

	int is_plist;
	int plist_position;
	int plist_id;
};

#define WMA     0x161
#define WMAPRO  0x162
#define WMALSL  0x163

extern int scan_init(char *path);
extern void make_composite_tags(struct song_metadata *psong);
extern int readtags(char *path, struct song_metadata *psong, struct stat *stat, char *lang, char *type);
extern void freetags(struct song_metadata *psong);

extern int start_plist(const char *path, struct song_metadata *psong, struct stat *stat, char *lang, char *type);
extern int next_plist_track(struct song_metadata *psong, struct stat *stat, char *lang, char *type);

#endif