void RedrawAllPieces() { //redraw everything foreach (Coordinate key in coordinatePieceMap.Keys) { GamePieceVisual gamePiece = (GamePieceVisual)coordinatePieceMap[key]; gamePiece.Redraw(); } }
public void ShowValidMovePieces(ValidMove validMove) { Coordinate sourceCoordinate = validMove.Source; GamePieceVisual sourcePiece = coordinatePieceMap[sourceCoordinate] as GamePieceVisual; sourcePiece.PieceState = PieceState.ValidSource; sourcePiece.Highlighted = true; sourcePiece.Redraw(); foreach (Coordinate destinationCoordinate in validMove.Destinations) { GamePieceVisual destinationPiece = coordinatePieceMap[destinationCoordinate] as GamePieceVisual; destinationPiece.PieceState = PieceState.ValidDestination; destinationPiece.Redraw(); } }