Skip to content

Frontend Assessment: Gamified 2-back task with useContext for state management, random letter generator, and event logging

Notifications You must be signed in to change notification settings

DevonGifford/Thymia

Repository files navigation

Take-Home Assessment

NextJs app handling 2-back memory game

Report Bug  ·  Request Feature

👋 Introduction:


The project involves creating a gamified version of the 2-back task, a cognitive test designed to measure working memory. In this task, users are presented with a sequence of letters and must determine if the current letter matches the one presented two trials before.

I chose Next.js for its built-in routing and used a global React context to manage state across components. The game operates with a random letter generator that progresses through intervals to present stimuli.
Additionally, I implemented error logging, simulating post requests, and added a toggle function to display event logs as toast notifications.



🔑 Assessment Requirements:


Required Features:

Repository Setup & Version Control: Setup GitHub with ReadMe

User Interaction: Create a React app allowing user name input before starting the 2-back task.

Task Completion Conditions: End task after either three errors or displaying 15 letters.

Event Logging: Capture user interactions as events, mimicking backend interaction.

Fully Responsive & Mobile Compatibility: Ensure UI is responsive and mobile-friendly.


Bonus Features:

Hosting App / Deployment: Deploy the solution online for easy reviewing.

Error Handling & Form Validation: Implement error handling and validation for graceful edge case handling.

Unit & Integration Testing: Include unit or integration tests if time allows.



🎯 Future potential improvements:


💥 Implement a feature to track missed correct answers by the user.

💥 Introduce brief blank intervals and/or card animations between each stimulus.

💥 Enhance UX by integrating a timer display or countdown feature for each presented stimulus.


(back to top)



About

Frontend Assessment: Gamified 2-back task with useContext for state management, random letter generator, and event logging

Topics

Resources

Stars

Watchers

Forks