Beispiel #1
0
        public DungeonGameRules()
        {
            Floors     = new DefinedFloors();
            FloorTypes = TypeRegistry.CreateFrom(Floors, f => f.Mud);

            Walls     = new DefinedWalls();
            WallTypes = TypeRegistry.CreateFrom(Walls, w => w.None);

            Decorations     = new DefinedDecorations();
            DecorationTypes = TypeRegistry.CreateFrom(Decorations, d => d.None);

            var idGenerator = new IdGenerator(1);

            Characters = new DefinedCharacters(idGenerator);

            Items     = new DefinedItems(idGenerator);
            ItemTypes = TypeRegistry.CreateFrom <IItemType>(Items).AppendFrom(Characters);
        }
Beispiel #2
0
        public StrategyGameRules()
        {
            Terrains     = new DefinedTerrains();
            TerrainTypes = TypeRegistry.CreateFrom(Terrains, t => t.Nothing);

            TerrainResources     = new DefinedResources();
            TerrainResourceTypes = TypeRegistry.CreateFrom(TerrainResources, r => r.None);

            var idGen = new IdGenerator();

            Roads     = new DefinedRoads(idGen);
            RoadTypes = TypeRegistry.CreateFrom(Roads.Nothing, Roads.Road, Roads.Railroad, Roads.River);

            TerrainImprovements     = new DefinedImprovements(idGen);
            TerrainImprovementTypes = TypeRegistry.CreateFrom(TerrainImprovements, i => i.None);

            MoveFragments = 3;
        }