Skip to content

Commit

Permalink
refactor: remove unused logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Danimal committed Mar 19, 2024
1 parent bb51abf commit d45d548
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/components/Game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const Game = ({ logic, flavor, level, id }: GameProps) => {
const [health, setHealth] = useState(MAX_HEALTH);
const [currentScore, setCurrentScore] = useState(0);
const [playerStatus, setPlayerStatus] = useState<PlayerStatus>("idle");
const [advanced, setAdvanced] = useState(false);

const [fenPosition, setFenPosition] = useState(0);
const [highlightPosition, setHighlightPosition] = useState(0);
Expand Down Expand Up @@ -119,10 +118,6 @@ export const Game = ({ logic, flavor, level, id }: GameProps) => {

const checkCompleted = async () => {
if (playerStatus === "gave-up" || readyToAdvance) {
if (solutions.length == 0) {
setAdvanced(true);
}

await gotoNextPuzzle();
setPlayerStatus("playing");
gainPoints();
Expand Down

0 comments on commit d45d548

Please sign in to comment.