public void DrawPossibleMovesInverse(Graphics g) { int square = PositionAndPixels.square; List <BoardPosition> listOfMoves = aPieceManipulator.GetListOfMoves(); if (listOfMoves != null) { foreach (BoardPosition bp in listOfMoves) { Point point = PositionAndPixels.BoardPositionToPixelsInverse(bp); g.DrawRectangle(aPen, point.X, point.Y, square, square); } } }
private void DrawPieces(Graphics g) { for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { if (aBoard.GetBoard()[i, j].HasPiece()) { Point point = new Point(); if (aFirstPlayer.Equals(Piece.Color.BLACK)) { point = PositionAndPixels.BoardPositionToPixels(new BoardPosition(i, j)); } else { point = PositionAndPixels.BoardPositionToPixelsInverse(new BoardPosition(i, j)); } aSquaresView[i, j].drawPiece(g, point); } } } }