コード例 #1
0
ファイル: BoardTest.cs プロジェクト: Hitchhikrr/tetris-attack
		public void LoseConditionIsNotMet()
		{
			Board target = new Board();
			bool actual = target.IsLoseConditionMet();

			Assert.IsFalse(actual);
		}
コード例 #2
0
ファイル: BoardTest.cs プロジェクト: Hitchhikrr/tetris-attack
		public void LoseConditionIsMet()
		{
			var blockLists = new System.Collections.Generic.List<System.Collections.Generic.LinkedList<Block>>();

			for (int counter = 0; counter < 6; counter++)
			{
				var linkedList = new System.Collections.Generic.LinkedList<Block>();

				for (int listCounter = 0; listCounter < 14; listCounter++)
				{
					linkedList.AddFirst(new Block());
				}
					
				blockLists.Add(linkedList);
			}
				
			Board target = new Board()
			{
				BlockLists = blockLists
			};

			bool actual = target.IsLoseConditionMet();

			Assert.IsTrue(actual);
		}