本文整理汇总了C#中IGame.MoveUnit方法的典型用法代码示例。如果您正苦于以下问题:C# IGame.MoveUnit方法的具体用法?C# IGame.MoveUnit怎么用?C# IGame.MoveUnit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IGame
的用法示例。
在下文中一共展示了IGame.MoveUnit方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Winner_IsRed_WhenRedHasConqueredTheBlueCity
public void Winner_IsRed_WhenRedHasConqueredTheBlueCity(IGame game)
{
// :::: ARRANGE ::::
game.MoveUnit(RedArcherTile, To(3, 1));
SkipRounds(game, 1);
// :::: ACT ::::
game.MoveUnit(From(3, 1), BlueCityTile);
// :::: ASSERT ::::
game.Winner.Should().Be(Red);
}
示例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);
}
示例3: 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);
}
示例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);
}
示例5: 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();
}
示例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();
}
示例7: RedSettler_DoesNotConquerTheBlueCityAt4x1
public void RedSettler_DoesNotConquerTheBlueCityAt4x1(IGame game)
{
// :::: ARRANGE ::::
game.MoveUnit(RedSettlerTile, To(4, 2));
SkipRounds(game, 1);
// :::: ACT ::::
game.MoveUnit(From(4, 2), BlueCityTile);
// :::: ASSERT ::::
game.CityAt(BlueCityTile).Owner.Should().Be(Blue);
}
示例8: BlueLegion_ConquersTheRedCityAt1x1
public void BlueLegion_ConquersTheRedCityAt1x1(IGame game)
{
// :::: ARRANGE ::::
game.EndTurn();
game.MoveUnit(BlueLegionTile, To(2, 1));
SkipRounds(game, 1);
// :::: ACT ::::
game.MoveUnit(From(2, 1), RedCityTile);
// :::: ASSERT ::::
game.CityAt(RedCityTile).Owner.Should().Be(Blue);
}
示例9: RedArcher_ConquersTheBlueCityAt4x1
public void RedArcher_ConquersTheBlueCityAt4x1(IGame game)
{
// :::: ARRANGE ::::
game.MoveUnit(RedArcherTile, To(3, 1));
SkipRounds(game, 1);
// :::: ACT ::::
game.MoveUnit(From(3, 1), BlueCityTile);
// :::: ASSERT ::::
game.CityAt(BlueCityTile).Owner.Should().Be(Red);
}
示例10: 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);
}
示例11: 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);
}
示例12: 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();
}
示例13: 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);
}
示例14: Winner_IsBlue_WhenBlueHasConqueredTheRedCity
public void Winner_IsBlue_WhenBlueHasConqueredTheRedCity(IGame game)
{
// :::: ARRANGE ::::
game.EndTurn();
game.MoveUnit(BlueLegionTile, To(2, 1));
SkipRounds(game, 1);
// :::: ACT ::::
game.MoveUnit(From(2, 1), RedCityTile);
// :::: ASSERT ::::
game.Winner.Should().Be(Blue);
}