+
);
};
-export default Gamepad;
+export default React.memo(Gamepad);
diff --git a/src/blockpuzzle/components/RotateIcon.tsx b/src/blockpuzzle/components/RotateIcon.tsx
new file mode 100644
index 0000000..b16fd73
--- /dev/null
+++ b/src/blockpuzzle/components/RotateIcon.tsx
@@ -0,0 +1,32 @@
+import classNames from "classnames";
+
+interface IconProps {
+ className?: string;
+}
+
+const RotateIcon = ({ className }: IconProps) => {
+ return (
+
+ );
+};
+
+export default RotateIcon;
diff --git a/src/blockpuzzle/game.ts b/src/blockpuzzle/game.ts
index 75705ba..d4ae187 100644
--- a/src/blockpuzzle/game.ts
+++ b/src/blockpuzzle/game.ts
@@ -369,7 +369,7 @@ export function clearCompleteRows(state: State) {
return {
grid: newGrid,
- score: state.score + scorePerRow * fullRows.length * fullRows. length,
+ score: state.score + state.level * scorePerRow * fullRows.length * fullRows.length,
};
}
diff --git a/src/blockpuzzle/store.ts b/src/blockpuzzle/store.ts
index 557b3d2..e2c23ed 100644
--- a/src/blockpuzzle/store.ts
+++ b/src/blockpuzzle/store.ts
@@ -72,14 +72,10 @@ const store: (callbacks: GameCallbacks) => StateCreator
=
return spawnBag;
};
- const limitedMove = throttle((input: GameInput) => get().move(input), 100, {
- leading: true,
- });
-
- const limitedDrop = throttle(() => get().drop(), 50, { leading: true });
- const limitedRotate = throttle(() => get().rotateClockwise(), 150, {
- leading: true,
- });
+ const limitedMove = throttle((input: GameInput) => get().move(input), 50);
+
+ const limitedDrop = throttle(() => get().drop(), 30);
+ const limitedRotate = throttle(() => get().rotateClockwise(), 100);
return {
...getInitialState(),