本文整理汇总了C#中Map.HasWumpusIn方法的典型用法代码示例。如果您正苦于以下问题:C# Map.HasWumpusIn方法的具体用法?C# Map.HasWumpusIn怎么用?C# Map.HasWumpusIn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Map
的用法示例。
在下文中一共展示了Map.HasWumpusIn方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ItCanSayIfItAHasAWumpusInACavern
public void ItCanSayIfItAHasAWumpusInACavern()
{
var map = new Map();
Assert.IsFalse(map.HasWumpusIn(1));
map.PlaceItem(1, MapItems.Wumpus);
Assert.IsTrue(map.HasWumpusIn(1));
}
示例2: ItAllowsAnotherItemWithTheWumpus
public void ItAllowsAnotherItemWithTheWumpus()
{
var map = new Map();
map.PlaceItem(1, MapItems.Wumpus);
map.PlaceItem(1, MapItems.Arrow);
Assert.IsTrue(map.HasWumpusIn(1));
Assert.AreEqual(2, map.ItemsInCavern(1).Count);
}
示例3: ItOnlyAllowsOneWumpus
public void ItOnlyAllowsOneWumpus()
{
var map = new Map();
map.PlaceItem(1, MapItems.Wumpus);
map.PlaceItem(2, MapItems.Wumpus);
Assert.IsFalse(map.HasWumpusIn(1));
Assert.IsTrue(map.HasWumpusIn(2));
}
示例4: ItDoesntMistakeAnyMapItemForAWumpus
public void ItDoesntMistakeAnyMapItemForAWumpus()
{
var map = new Map();
map.PlaceItem(1, MapItems.Arrow);
Assert.IsFalse(map.HasWumpusIn(1));
}
示例5: ItDoesntMistakeAnEmptyCaveForAWumpus
public void ItDoesntMistakeAnEmptyCaveForAWumpus()
{
var map = new Map();
map.AddPath(0, 1, Command.Directions.West);
Assert.IsFalse(map.HasWumpusIn(0));
}
示例6: ItMovesTheWumpusEachTurnBasedOnWumpusMover
public void ItMovesTheWumpusEachTurnBasedOnWumpusMover()
{
var presenter = Substitute.For<Presenter>();
var map = new Map();
map.PlaceItem(2, MapItems.Wumpus);
var mover = Substitute.For<WumpusMover>();
mover.Move(map).Returns(4);
var game = new Game(presenter, map)
{
Mover = mover
};
game.Command(new Command
{
Order = Command.Commands.Rest
});
Assert.IsTrue(map.HasWumpusIn(4));
}
示例7: ItDoesntMoveTheWumpusIfTheWumpusIsntPlaced
public void ItDoesntMoveTheWumpusIfTheWumpusIsntPlaced()
{
var presenter = Substitute.For<Presenter>();
var map = new Map();
var mover = Substitute.For<WumpusMover>();
mover.Move(map).Returns(4);
var game = new Game(presenter, map)
{
Mover = mover
};
game.Command(new Command
{
Order = Command.Commands.Rest
});
Assert.IsFalse(map.HasWumpusIn(4));
}
示例8: ItDoesntMoveIfTheWumpusHasBeenKilled
public void ItDoesntMoveIfTheWumpusHasBeenKilled()
{
var presenter = Substitute.For<Presenter>();
var map = new Map();
var mover = Substitute.For<WumpusMover>();
mover.Move(map).Returns(5);
var game = new Game(presenter, map)
{
Mover = mover
};
KillWumpus(game, map);
Assert.IsFalse(map.HasWumpusIn(5));
}