示例#1
0
        private Position PieceOriginInPixels(Piece piece)
        {
            var baseOriginInPixels = piece.IsNextPiece ? _display.BoardOriginInPixels() : _display.NextPieceOriginInPixels();

            var originX = baseOriginInPixels.X + (piece.PosX * _display.BlockSizeInPixels());
            var originY = baseOriginInPixels.Y + (piece.PosY * _display.BoardHeightInPixels());

            return(new Position(originX, originY));
        }