Esempio n. 1
0
        public void ControlBlocksの座標と保持しているブロックの座標からボードでの座標を持つブロックリストを生成するテスト()
        {
            var controlBlocks          = new ControlBlocks(5, 1, IBlocks);
            var boardPositionBlockList = controlBlocks.GetBoardPositionBlockList();

            Assert.AreEqual(5, boardPositionBlockList[0].X);
            Assert.AreEqual(3, boardPositionBlockList[0].Y);
            Assert.AreEqual(5, boardPositionBlockList[1].X);
            Assert.AreEqual(2, boardPositionBlockList[1].Y);
            Assert.AreEqual(5, boardPositionBlockList[2].X);
            Assert.AreEqual(1, boardPositionBlockList[2].Y);
            Assert.AreEqual(5, boardPositionBlockList[3].X);
            Assert.AreEqual(0, boardPositionBlockList[3].Y);
        }
Esempio n. 2
0
    public List <BoardPutBlock> PutBlocks(ControlBlocks controlBlocks)
    {
        var addPutBlocks = new List <BoardPutBlock>();

        foreach (var block in controlBlocks.GetBoardPositionBlockList())
        {
            var newBoardPutBlock = new BoardPutBlock(NextBlockId, block);
            NextBlockId++;

            addPutBlocks.Add(newBoardPutBlock);
        }
        BoardPutBlocks.AddBoardPutBlocks(addPutBlocks);

        return(addPutBlocks);
    }