var SPACE_FOR_BRICKS = getWidth() - (NUM_BRICKS_PER_ROW + 1) * BRICK_SPACING; var BRICK_WIDTH = SPACE_FOR_BRICKS / NUM_BRICKS_PER_ROW; ...
//variables for white pieces (only one variable for the pawn even though there are 8) //variables for black pieces (only one variable for the pawn even though there are 8) ...