Live Url: http://additup.azurewebsites.net
The objective of this exercise is to create a simple website that offers games to train your brain. The 1st game to implement is AddItUp - a simple addition online game.
- When user connects to the web application, he is presented with a simple page with a question of type a + b = ?
- User must submit answer within given timeframe (defined by server). User can submit one and only one answer for a given equation.
- Timer should be displayed on screen for user to know how much time is left.
- If answer is correct, next question is returned.
- If user provides 3 good answers in a row he is promoted to the next rank and time allowance for each question is reduced by 1 second. Example of ranks: "Beginner", "Talented", "Intermediate", "Advanced", "Expert"
- If answer is incorrect or time runs out game ends and user is offered the option to start again.
- 2 users should not see the same equations at the same time.
- WebApi .net core project
- React app
Exercise creation and score management should be done on the server.
- All of the Game logic (checking of time, checking of answer, moving levels etc) is in the back-end
- Each gaming session is identified by Id (GUID), Calling GET API will start the game and create a new Guid
- There is an InMemoery DB which holds the data
- Answers are send to POST API, which returns with a Response (failed, time elapsed and the next exercise in case of valid answer)
- Allowed time for a level is provided by server (starts with 20 sec for first level) but actual timer showing the countdown is in the React App, there will be some latency between client and server communication when user submits the answer hence user could lose few milliseconds theoretically.