Ejemplo n.º 1
0
        private GameBlock[,] CreateBlocksMatrix()
        {
            var matrix = new GameBlock[Size, Size];

            foreach (var gameBlock in locationGameBlocksArray)
            {
                matrix[gameBlock.PositionX, gameBlock.PositionY] = gameBlock;
            }
            return(matrix);
        }
Ejemplo n.º 2
0
 public bool IsRelatedWith(GameBlock gameBlock)
 {
     return(Math.Abs(gameBlock.PositionX - PositionX) + gameBlock.PositionY - PositionY == 1 ||
            Math.Abs(gameBlock.PositionY - PositionY) + gameBlock.PositionX - PositionX == 1);
 }