示例#1
0
文件: Block.cs 项目: Aiden-p77/Chess
        // Draw Single/Multiple Block
        internal void Draw(BlockFactory bFactory, Graphics g, bool bHighLight, bool bIsLastMove)
        {
            StringBuilder title = new StringBuilder();


            BlockRect bRect = bFactory.GetBlockRect(bColor);

            if (aPiece == null)
            {
                title.Append(ChessPos.ToString());
            }
            else
            {
                title.Append(ChessPos.ToString() + '/' + aPiece.GetPieceType().ToString());
            }


            bRect.Draw(g, StartPos.X, StartPos.Y, title.ToString(), IsHighlight, bIsLastMove);
        }