https://github.com/exios66/n-back-task
https://github.com/exios66/n-back-task
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/exios66/n-back-task
- Owner: Exios66
- Created: 2025-03-15T01:39:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-16T22:57:08.000Z (over 1 year ago)
- Last Synced: 2025-10-18T22:40:25.066Z (9 months ago)
- Language: HTML
- Homepage: https://exios66.github.io/n-back-task/
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The N-Back Task
## v0.0.1 Updates
### Key Enhancements and Debug Fixes
1. Unified Response Handling:
* The new global function processResponse(e) is used by both the keyboard and touch events. It checks if a trial is in progress, calculates the reaction time, determines if the response is correct, and then clears a scheduled timeout. This avoids duplicate code and makes the logic more robust.
2. Global Current Trial Storage:
* A global variable currentTrial now holds the trial information so that it’s available to the response handler regardless of input type.
3. Timeout Management:
* The response timeout (stored in responseTimeout) is cleared as soon as a valid response is received, preventing the omission handler from firing if the user responded in time.
4. Consistent UI Feedback:
* The display’s classes are updated to show “active,” “correct,” or “error” states, ensuring a smooth visual transition.