public static void build(Region region, int x, int y, Building building)
        {
            switch (building.getBuildingType())
            {
                case BuildingType.BANK:
                    buildByArray(region, x, y, building, bankStruct);
                    break;

                case BuildingType.INN:
                    buildByArray(region, x, y, building, innStruct);
                    building.setLit(false);
                    break;

                case BuildingType.HOUSE:
                    buildByArray(region, x, y, building, houseStruct);
                    break;

                case BuildingType.FOOD_STORE:
                    buildByArray(region, x, y, building, foodStoreStruct);
                    break;

                case BuildingType.TOOL_STORE:
                    buildByArray(region, x, y, building, toolStoreStruct);
                    break;
            }
        }
        public static void buildByArray(Region region, int startX, int startY, Building building, int[,] plan)
        {
            for (int x = 0; x < BuildingManager.getWidth(building.getBuildingType()); x++)
            {
                for (int y = 0; y < BuildingManager.getHeight(building.getBuildingType()); y++)
                {
                    if (x + startX < region.getWidth() && x + startX > 0
                    && y + startY < region.getHeight() && y + startY > 0)
                    {
                        switch (plan[y,x])
                        {
                            case 0:
                                region.getTerrain(startX + x, startY + y).setCode(TerrainCode.STONE_FLOOR);
                                break;

                            case 1:
                                region.getTerrain(startX + x, startY + y).setCode(TerrainCode.STONE_WALL);
                                break;

                            case 9:
                                region.getTerrain(startX + x, startY + y).setCode(TerrainCode.STONE_FLOOR);
                                region.getTerrain(startX + x, startY + y).getParameters().Add(TerrainParameter.HAS_DOOR, Enum.GetName(typeof(DoorCode), DoorCode.CLOSED));
                                building.setDoor(startX + x, startY + y);
                                break;

                            case 8:
                                region.getTerrain(startX + x, startY + y).setCode(TerrainCode.STONE_WALL);
                                region.getTerrain(startX + x, startY + y).getParameters().Add(TerrainParameter.HAS_SIGN, building.getName());
                                break;

                            case 2:
                                region.getTerrain(startX + x, startY + y).setCode(TerrainCode.STONE_FLOOR);
                                Monster newMon = new Monster();
                                switch (building.getBuildingType())
                                {
                                    case BuildingType.BANK:
                                        newMon.monsterCode = MonsterCode.HUMAN;
                                        newMon.role = MonsterRole.BANKER;
                                        break;

                                    case BuildingType.INN:
                                        newMon.monsterCode = MonsterCode.HUMAN;
                                        newMon.role = MonsterRole.NULL;
                                        break;

                                    case BuildingType.FOOD_STORE:
                                        newMon.monsterCode = MonsterCode.HUMAN;
                                        newMon.role = MonsterRole.CHEF;
                                        break;

                                    case BuildingType.TOOL_STORE:
                                        newMon.monsterCode = MonsterCode.HUMAN;
                                        newMon.role = MonsterRole.HANDYMAN;
                                        break;
                                }
                                MonsterActionManager.initialize(newMon);
                                newMon.setPosition(startX + x, startY + y);
                                region.getMonsters().Add(newMon);
                                break;

                            case 3:
                                //Add a bed
                                region.getTerrain(startX + x, startY + y).setCode(TerrainCode.STONE_FLOOR);
                                region.getTerrain(startX + x, startY + y).getParameters().Add(TerrainParameter.HAS_BED, "");
                                break;
                        }
                    }
                }
            }
        }
        public static String makeBuildingName(Building building)
        {
            switch (building.getBuildingType())
            {
                case BuildingType.BANK:
                    return NameMaker.makeBankName();

                case BuildingType.FOOD_STORE:
                    return NameMaker.makeFoodName();

            }
            return EnumUtil.EnumName<BuildingType>(building.getBuildingType());
        }
 public static void initialize(Building building)
 {
     building.setWidth(getWidth(building.getBuildingType()));
     building.setHeight(getHeight(building.getBuildingType()));
     building.setName(BuildingManager.makeBuildingName(building));
 }