当前位置: 首页>>代码示例>>C#>>正文


C# IGame.UnitAt方法代码示例

本文整理汇总了C#中IGame.UnitAt方法的典型用法代码示例。如果您正苦于以下问题:C# IGame.UnitAt方法的具体用法?C# IGame.UnitAt怎么用?C# IGame.UnitAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IGame的用法示例。


在下文中一共展示了IGame.UnitAt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BlueCityAt4x1_ProducesABlueSettler_AfterFiveRounds

        public void BlueCityAt4x1_ProducesABlueSettler_AfterFiveRounds(IGame game)
        {
            // :::: ARRANGE ::::
            game.EndTurn();
            game.ChangeCityProductionProjectAt(BlueCityTile, Settler);

            // :::: ACT ::::
            SkipRounds(game, 5);

            // :::: ASSERT ::::
            game.UnitAt(BlueCityTile).Owner.Should().Be(Blue);
            game.UnitAt(BlueCityTile).Type.Should().Be(Settler);
            game.UnitAt(BlueCityTile).RemainingMovement.Should().Be(1);
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:14,代码来源:TestExtenCiv.cs

示例2: RedSettlerAt4x3_DoesNotMoveMoreThanOneTileDuringARound

        public void RedSettlerAt4x3_DoesNotMoveMoreThanOneTileDuringARound(IGame game)
        {
            // :::: ARRANGE ::::
            game.MoveUnit(RedSettlerTile, To(4, 2));

            // :::: ACT ::::
            game.MoveUnit(From(4, 2), RedSettlerTile);

            // :::: ASSERT ::::
            game.UnitAt(RedSettlerTile).Should().BeNull();
            game.UnitAt(Location(4, 2)).Owner.Should().Be(Red);
            game.UnitAt(Location(4, 2)).Type.Should().Be(Settler);
            game.UnitAt(Location(4, 2)).RemainingMovement.Should().Be(0);
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:14,代码来源:TestExtenCiv.cs

示例3: RedCityAt1x1_ProducesARedArcher_AfterTwoRounds

        public void RedCityAt1x1_ProducesARedArcher_AfterTwoRounds(IGame game)
        {
            // :::: ARRANGE ::::
            game.ChangeCityProductionProjectAt(RedCityTile, Archer);

            // :::: ACT ::::
            SkipRounds(game, 2);

            // :::: ASSERT ::::
            game.UnitAt(RedCityTile).Owner.Should().Be(Red);
            game.UnitAt(RedCityTile).Type.Should().Be(Archer);
            game.UnitAt(RedCityTile).RemainingMovement.Should().Be(1);
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:13,代码来源:TestExtenCiv.cs

示例4: RedArcher_DoesNotMoveOntoTheRedSettlerAt4x3

        public void RedArcher_DoesNotMoveOntoTheRedSettlerAt4x3(IGame game)
        {
            // :::: ARRANGE ::::
            game.MoveUnit(RedArcherTile, To(3, 1));
            SkipRounds(game, 1);

            game.MoveUnit(From(3, 1), To(4, 2));
            SkipRounds(game, 1);

            // :::: ACT ::::
            game.MoveUnit(From(4, 2), RedSettlerTile);

            // :::: ASSERT ::::
            game.UnitAt(Location(4, 2)).Owner.Should().Be(Red);
            game.UnitAt(Location(4, 2)).Type.Should().Be(Archer);
            game.UnitAt(Location(4, 2)).RemainingMovement.Should().Be(1);

            game.UnitAt(RedSettlerTile).Owner.Should().Be(Red);
            game.UnitAt(RedSettlerTile).Type.Should().Be(Settler);
            game.UnitAt(RedSettlerTile).RemainingMovement.Should().Be(1);
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:21,代码来源:TestExtenCiv.cs

示例5: BlueLegionAt3x2_DoesNotMoveMoreThanOneTileDuringARound

        public void BlueLegionAt3x2_DoesNotMoveMoreThanOneTileDuringARound(IGame game)
        {
            // :::: ARRANGE ::::
            game.EndTurn();
            game.MoveUnit(BlueLegionTile, To(3, 1));

            // :::: ACT ::::
            game.MoveUnit(From(3, 1), BlueLegionTile);

            // :::: ASSERT ::::
            game.UnitAt(BlueLegionTile).Should().BeNull();
            game.UnitAt(Location(3, 1)).Owner.Should().Be(Blue);
            game.UnitAt(Location(3, 1)).Type.Should().Be(Legion);
            game.UnitAt(Location(3, 1)).RemainingMovement.Should().Be(0);
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:15,代码来源:TestExtenCiv.cs

示例6: RedArcherAt2x0_DoesNotMoveToOceansAt1x0

        public void RedArcherAt2x0_DoesNotMoveToOceansAt1x0(IGame game)
        {
            // :::: ACT ::::
            game.MoveUnit(RedArcherTile, OceansTile);

            // :::: ASSERT ::::
            game.UnitAt(RedArcherTile).Owner.Should().Be(Red);
            game.UnitAt(RedArcherTile).Type.Should().Be(Archer);
            game.UnitAt(RedArcherTile).RemainingMovement.Should().Be(1);
            game.UnitAt(OceansTile).Should().BeNull();
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:11,代码来源:TestExtenCiv.cs

示例7: BlueLegionAt3x2_DoesNotMoveToMountainsAt2x2

        public void BlueLegionAt3x2_DoesNotMoveToMountainsAt2x2(IGame game)
        {
            // :::: ACT ::::
            game.MoveUnit(BlueLegionTile, MountainsTile);

            // :::: ASSERT ::::
            game.UnitAt(BlueLegionTile).Owner.Should().Be(Blue);
            game.UnitAt(BlueLegionTile).Type.Should().Be(Legion);
            game.UnitAt(BlueLegionTile).RemainingMovement.Should().Be(1);
            game.UnitAt(MountainsTile).Should().BeNull();
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:11,代码来源:TestExtenCiv.cs

示例8: RedArcher_DefeatsTheBlueLegionAt3x2

        public void RedArcher_DefeatsTheBlueLegionAt3x2(IGame game)
        {
            // :::: ARRANGE ::::
            game.MoveUnit(RedArcherTile, To(3, 1));
            SkipRounds(game, 1);

            // :::: ACT ::::
            game.MoveUnit(From(3, 1), BlueLegionTile);

            // :::: ASSERT ::::
            game.UnitAt(Location(3, 1)).Should().BeNull();
            game.UnitAt(BlueLegionTile).Owner.Should().Be(Red);
            game.UnitAt(BlueLegionTile).Type.Should().Be(Archer);
            game.UnitAt(BlueLegionTile).RemainingMovement.Should().Be(0);
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:15,代码来源:TestExtenCiv.cs

示例9: BlueLegion_DefeatsTheRedSettlerAt4x3

        public void BlueLegion_DefeatsTheRedSettlerAt4x3(IGame game)
        {
            // :::: ARRANGE ::::
            game.EndTurn();

            // :::: ACT ::::
            game.MoveUnit(BlueLegionTile, RedSettlerTile);

            // :::: ASSERT ::::
            game.UnitAt(BlueLegionTile).Should().BeNull();
            game.UnitAt(RedSettlerTile).Owner.Should().Be(Blue);
            game.UnitAt(RedSettlerTile).Type.Should().Be(Legion);
            game.UnitAt(RedSettlerTile).RemainingMovement.Should().Be(0);
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:14,代码来源:TestExtenCiv.cs

示例10: RedArcherAt2x0_MovesTo2x1_WhenRedIsInTurn

        public void RedArcherAt2x0_MovesTo2x1_WhenRedIsInTurn(IGame game)
        {
            // :::: ACT ::::
            game.MoveUnit(RedArcherTile, To(2, 1));

            // :::: ASSERT ::::
            game.UnitAt(RedArcherTile).Should().BeNull();
            game.UnitAt(Location(2, 1)).Owner.Should().Be(Red);
            game.UnitAt(Location(2, 1)).Type.Should().Be(Archer);
            game.UnitAt(Location(2, 1)).RemainingMovement.Should().Be(0);
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:11,代码来源:TestExtenCiv.cs

示例11: RedArcherAt2x0_DoesNotMoveTo2x1_WhenBlueIsInTurn

        public void RedArcherAt2x0_DoesNotMoveTo2x1_WhenBlueIsInTurn(IGame game)
        {
            // :::: ARRANGE ::::
            game.EndTurn();

            // :::: ACT ::::
            game.MoveUnit(RedArcherTile, To(2, 1));

            // :::: ASSERT ::::
            game.UnitAt(RedArcherTile).Owner.Should().Be(Red);
            game.UnitAt(RedArcherTile).Type.Should().Be(Archer);
            game.UnitAt(RedArcherTile).RemainingMovement.Should().Be(1);
            game.UnitAt(Location(2, 1)).Should().BeNull();
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:14,代码来源:TestExtenCiv.cs

示例12: RedSettlerAt4x3_DoesNotBuildACity_WhenBlueIsInTurn

        public void RedSettlerAt4x3_DoesNotBuildACity_WhenBlueIsInTurn(IGame game)
        {
            // :::: ARRANGE ::::
            game.EndTurn();

            // :::: ACT ::::
            game.PerformUnitActionAt(RedSettlerTile);

            // :::: ASSERT ::::
            game.UnitAt(RedSettlerTile).Should().NotBeNull();
            game.CityAt(RedSettlerTile).Should().BeNull();
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:12,代码来源:TestSemiCiv.cs

示例13: RedSettlerAt4x3_BuildsARedCity_WhenRedIsInTurn

        public void RedSettlerAt4x3_BuildsARedCity_WhenRedIsInTurn(IGame game)
        {
            // :::: ACT ::::
            game.PerformUnitActionAt(RedSettlerTile);

            // :::: ASSERT ::::
            game.UnitAt(RedSettlerTile).Should().BeNull();
            game.CityAt(RedSettlerTile).Should().NotBeNull();
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:9,代码来源:TestSemiCiv.cs

示例14: BlueChariotAt4x1_DoesNotFortify_WhenRedIsInTurn

        public void BlueChariotAt4x1_DoesNotFortify_WhenRedIsInTurn(IGame game)
        {
            // :::: ARRANGE ::::
            game.EndTurn();
            game.ChangeCityProductionProjectAt(BlueCityTile, Chariot);
            SkipRounds(game, 4);
            game.EndTurn();

            // :::: ACT ::::
            game.PerformUnitActionAt(BlueCityTile);

            // :::: ASSERT ::::
            game.UnitAt(BlueCityTile).RemainingMovement.Should().Be(1);
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:14,代码来源:TestSemiCiv.cs

示例15: RedArcherAt2x0_DoesNotFortify_WhenBlueIsInTurn

        public void RedArcherAt2x0_DoesNotFortify_WhenBlueIsInTurn(IGame game)
        {
            // :::: ARRANGE ::::
            game.EndTurn();

            // :::: ACT ::::
            game.PerformUnitActionAt(RedArcherTile);

            // :::: ASSERT ::::
            game.UnitAt(RedArcherTile).RemainingMovement.Should().Be(1);
        }
开发者ID:SPDiswal,项目名称:ExtenCiv,代码行数:11,代码来源:TestSemiCiv.cs


注:本文中的IGame.UnitAt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。