summaryrefslogtreecommitdiff
path: root/game.js
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2024-08-10 21:07:21 -0400
committerpommicket <pommicket@gmail.com>2024-08-10 21:10:23 -0400
commit8ad005478a0dfcb187bb1ba65668977ae8ef4cf2 (patch)
tree9973b40c23639f2de6adab5dd8e45365012d3955 /game.js
parent24564afb32d2fd65c3d39d1114764bda831d1563 (diff)
nicer starting positions
Diffstat (limited to 'game.js')
-rw-r--r--game.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/game.js b/game.js
index 77789b5..d18cb01 100644
--- a/game.js
+++ b/game.js
@@ -379,10 +379,10 @@ window.addEventListener('load', function () {
}
let nibTypeIndex = 0;
if (playArea.clientWidth / puzzleWidth < playArea.clientHeight / puzzleHeight) {
- pieceWidth = 0.5 * playArea.clientWidth / puzzleWidth;
+ pieceWidth = 0.6 * playArea.clientWidth / puzzleWidth;
pieceHeight = pieceWidth * (puzzleWidth / puzzleHeight) * (image.height / image.width);
} else {
- pieceHeight = 0.5 * playArea.clientHeight / puzzleHeight;
+ pieceHeight = 0.6 * playArea.clientHeight / puzzleHeight;
pieceWidth = pieceHeight * (puzzleHeight / puzzleWidth) * (image.width / image.height);
}
nibSize = Math.min(pieceWidth / 4, pieceHeight / 4);