Skip to content

Commit

Permalink
Increased domino hit radius
Browse files Browse the repository at this point in the history
  • Loading branch information
imkunet committed Mar 5, 2024
1 parent 77fcc24 commit abcbc11
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 23 deletions.
48 changes: 25 additions & 23 deletions src/pages/Game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -445,29 +445,31 @@ function Game() {
animate={{ scale: 1, opacity: 1 }}
exit={{ scale: 0.9, opacity: 0 }}
>
<Motion.div
animate={{
opacity: twoMode() ? 0.5 : 1.0,
scale: twoMode() ? 0.9 : 1.0,
}}
transition={{ duration: 0.08 }}
onClick={toggleTwoMode}
class={`mino mino-one`}
>
<div />
</Motion.div>
<Motion.div
animate={{
opacity: !twoMode() ? 0.5 : 1.0,
scale: !twoMode() ? 0.9 : 1.0,
}}
transition={{ duration: 0.08 }}
onClick={toggleTwoMode}
class={`mino mino-two`}
>
<div />
<div />
</Motion.div>
<div onClick={toggleTwoMode}>
<Motion.div
animate={{
opacity: twoMode() ? 0.5 : 1.0,
scale: twoMode() ? 0.9 : 1.0,
}}
transition={{ duration: 0.08 }}
class={`mino mino-one`}
>
<div />
</Motion.div>
</div>
<div onClick={toggleTwoMode}>
<Motion.div
animate={{
opacity: !twoMode() ? 0.5 : 1.0,
scale: !twoMode() ? 0.9 : 1.0,
}}
transition={{ duration: 0.08 }}
class={`mino mino-two`}
>
<div />
<div />
</Motion.div>
</div>
</Motion.div>
</Show>
<Show when={solved()}>
Expand Down
8 changes: 8 additions & 0 deletions src/styles/game.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@
gap: 2rem;
}

.mino-picker > div:nth-child(1) {
padding: 0 calc(var(--game-tile-size) / 2);
}

.mino-picker > div:nth-child(2) {
padding: calc(var(--game-tile-size) / 2) 0;
}

.block {
display: flex;
background: var(--game-block-color);
Expand Down

0 comments on commit abcbc11

Please sign in to comment.