Skip to content

Commit 6337359

Browse files
author
strangeCamel
committed
do exact fit
1 parent 9ea5541 commit 6337359

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/friendless/games/filler/FillerBoard.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ public class FillerBoard extends JComponent implements ComponentListener {
4040

4141
public void updateSize() {
4242
Dimension mySize = getSize();
43-
int dX = FillerSettings.COLUMNS > 0 ? (mySize.width - 10) / FillerSettings.COLUMNS : MIN_SIZE;
44-
int dY = FillerSettings.ROWS > 0 ? (mySize.height - 10) / FillerSettings.ROWS / 4 : MIN_SIZE;
43+
int dX = FillerSettings.COLUMNS > 0 ? mySize.width / (FillerSettings.COLUMNS + 1) : MIN_SIZE;
44+
int dY = FillerSettings.ROWS > 0 ? mySize.height / FillerSettings.ROWS / 4 : MIN_SIZE;
4545
// System.out.printf("width=%d height=%d cols=%d rows=%d dx=%d dy=%d\n",
4646
// mySize.width, mySize.height, FillerSettings.COLUMNS, FillerSettings.ROWS, dX, dY);
4747
SIZE = (dX < dY) ? dX : dY;

0 commit comments

Comments
 (0)