diff --git a/src/app/learning/tactics/[pattern]/page.tsx b/src/app/learning/tactics/[pattern]/page.tsx index 0ce650f..ed5a5a0 100644 --- a/src/app/learning/tactics/[pattern]/page.tsx +++ b/src/app/learning/tactics/[pattern]/page.tsx @@ -275,9 +275,8 @@ export default function TacticalPracticePage() { })); } else { errorSound.current?.play().catch(e => console.error("Audio play failed", e)); - setFeedback('incorrect'); - // Undo the wrong move instead of resetting to start position - // This allows the user to try again from the same position (like chess.com) + // Don't set feedback to 'incorrect' - just play error sound and undo + // This allows the user to immediately try again without clicking "Try Again" gameRef.current.undo(); setFen(gameRef.current.fen()); @@ -315,9 +314,8 @@ export default function TacticalPracticePage() { if (!isCorrect) { errorSound.current?.play().catch(e => console.error("Audio play failed", e)); - setFeedback('incorrect'); - // Undo the wrong move instead of resetting to start position - // This allows the user to try again from the same position (like chess.com) + // Don't set feedback to 'incorrect' - just play error sound and undo + // This allows the user to immediately try again without clicking "Try Again" // The currentMoveIndex stays the same since we're still waiting for the same move gameRef.current.undo(); setFen(gameRef.current.fen()); @@ -385,15 +383,6 @@ export default function TacticalPracticePage() { } }; - const handleTryAgain = () => { - // Since we now undo the wrong move immediately when it's made, - // the board is already in the correct position (before the error). - // We just need to reset the feedback state to allow the user to try again. - setFeedback('none'); - // Don't reset userMove - keep the chat context - // The Tutor will know the user tried again because feedback changed to 'none' - }; - const handleSkipPuzzle = () => { // Skip counts as incorrect for stats setStats(prev => ({ @@ -637,7 +626,7 @@ export default function TacticalPracticePage() { {/* Action Buttons */}