public void FillWithAnimals_CannotFillNullBoaardWithAnimals_Exception() { var gameplay = new Gameplay { Animals = new List<IAnimal>() }; AddAnimals(gameplay); Assert.Throws<NullReferenceException>(() => board.FillWithAnimals(gameplay.Animals)); }
public void Show(Gameplay gameplay) { Console.Write("L - add lion "); Console.WriteLine("A - add antilope"); Console.Write("Press any other key to resume..."); SelectAction(Console.ReadKey(true).Key, gameplay); Console.WriteLine(); }
public void Setup() { lion = new Lion(); lionActions = new LionActions(); gameplay = new Gameplay { Animals = new List<IAnimal>() }; }
public void SetUp() { gameplay = new Gameplay { Animals = new List<IAnimal>() }; animalActions= new AnimalActions(); board = new Board(); board.Create(); }
public void SetUp() { antilope = new Antilope(); antilopeActions = new AntilopeActions(); gameplay = new Gameplay { Animals = new List<IAnimal>() }; board = new Board(); board.Create(); }
private void SelectAction(ConsoleKey key, Gameplay gameplay) { switch (key) { case ConsoleKey.L: animalActions.AddAnimal(new Lion(), gameplay.Animals); break; case ConsoleKey.A: animalActions.AddAnimal(new Antilope(), gameplay.Animals); break; } }
public void FillWithAnimals_CanFillBoad_Can() { var gameplay = new Gameplay { Animals = new List<IAnimal>() }; AddAnimals(gameplay); board.Layout = new char[10, 10]; var emptyField = new char[10, 10]; board.FillWithAnimals(gameplay.Animals); Assert.AreNotEqual(emptyField, board.Layout); }
public void Clear_ClearsBoardFormAnimals_ClearBoard() { board.Create(); var gameplay = new Gameplay { Animals = new List<IAnimal>() }; AddAnimals(gameplay); board.FillWithAnimals(gameplay.Animals); object filledBoard = board.Layout.Clone(); board.Clear(gameplay.Animals); Assert.AreNotEqual(filledBoard, board.Layout); }
public void SetUp() { gameplay = new Gameplay { Animals = new List<IAnimal>() }; }
private void AddAnimals(Gameplay gameplay) { AnimalActions animalActions = new AnimalActions(); animalActions.AddAnimal(new Antilope(), gameplay.Animals); animalActions.AddAnimal(new Antilope(), gameplay.Animals); }
private Gameplay InitializeAllNecessaryForOutOfBounds() { board.Create(); var gameplay = new Gameplay { Animals = new List<IAnimal>() }; gameplay.Animals.Add(new Antilope()); return gameplay; }
public void FillWithAnimals_CannotFillBoardWithNoAnimals_Exception() { var gameplay = new Gameplay(); board.Layout = new char[5, 5]; Assert.Throws<NullReferenceException>(() => board.FillWithAnimals(gameplay.Animals)); }
private static void Main() { var g = new Gameplay(); g.NewGame(); }