Please fix failing tests:
getGameScore: will require implementing the "player scored logic"
getGameScore: will require implementing the "player win logic" after 40-0:
setScore: will require implementing the "deuce logic"
<Scoreboard />: will require implementing the game scoring UI interactions
- Each player can have either of these points in one game: 0, 15, 30, 40, A.
- If one player has 40, and her opponent has less than 40, and she wins the next point, she wins the game.
- If both players reach 40 the game is in 'Deuce'.
- If the game is in 'Deuce', the winner of the next point has 'Advantage' (A).
- If the player with A wins the point she wins the game.
- If the player without A wins the point the game goes back to 'Deuce'.
- When a player has 0 points, it is called 'love'
- When both players have the same score, the suffixe '-all' is added
- If player1 has advantage, the score is called 'Advantage, player1'
- If player1 wins, the score is called 'Game, player1'
Score Calling examples:
- 0-0 = love-all
- 15-15 = 15-all
- 15-0 = 15-love
- AD-40 = Advantage, player1
Useful links with more details on score calling:
To run locally
- Clone the project on your local machine
- Use node version specified in
nvmuse correct node version:
- Install dependencies:
- Run the development version of the app with auto-reloading:
The browser will automatically be loaded and the app displayed.
- Run the tests:
npm run test
If you want the tests to be automatically re-executed on change:
npm run test -- --watch
- Don’t worry about external state managers (i.e. redux), patterns and things like isomorphic/universal rendering.
- You will be adding functionality to your response once you progress to the paring exercise with two of our engineers.
- The logic of the problem is meant to be straightforward with no intentionally hidden gotchas.
- Writing css/sass is not required at this stage, but may be asked during the next stage of the interview.