コード例 #1
0
ファイル: BoardTest.cs プロジェクト: Hitchhikrr/tetris-attack
		public void PushBlocksTest()
		{
			int numberOfBlocksInTheList = 10;
			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 < numberOfBlocksInTheList; listCounter++)
				{
					linkedList.AddFirst(new Block());
				}

				blockLists.Add(linkedList);
			}

			Board target = new Board()
			{
				BlockLists = blockLists
			};

			target.PushBlocks();

			Assert.AreEqual(++numberOfBlocksInTheList, target.BlockLists[0].Count);
		}