Exemple #1
0
        internal static Image GetSquareImage(Square square, Piece piece = null)
        {
            if (piece == null)
                return boardImageCache["Empty"][square.GetSquareColor()];

            var squareColor = square.GetSquareColor();
            var key = piece.Player + piece.GetType().Name;
            return boardImageCache[key][squareColor];
        }