import java.awt.Color; import java.awt.Graphics; import java.awt.Rectangle; public class ChessBoard { private int size; private int n, top, left; public static final int GAP=7; private Rectangle bounds; private Square[][] squares; private Knight knight; public ChessBoard(int dimension, int size, int topLeftX, int topLeftY){ n=dimension; this.size=size; this.top=topLeftY; this.left=topLeftX; bounds = new Rectangle(left, top, n*size+(n+1)*GAP, n*size+(n+1)*GAP); squares = new Square[n][n]; knight = new Knight(4,3); for(int i=0; i