The purpose of the code test
The code test is meant for candidates to show that they can write and structure code. The code test can be done at home and candidates can take as much time as needed. The result does not need to be perfect. The code will be used as a starting point for discussions about programming and related topics. The techniques used to solve the test are very relevant for the work done at Bionamic.
The diamond race
The purpose of the test is to write a tiny game called the diamond race. The 3 figures below show the game. Four colored diamonds move from the start line to the finish line. A click on a diamond moves it one step to the right. It takes 10 steps to win. The score board shows the current scores. When one diamond has a score of 10, the diamonds stop responding to clicks. The reset button takes the diamonds back to start. If any rules are unclear, an arbitrary choice can be made by the implementation.
Requirements and recommendations
- The game should be a single page web application with one index.html file.
- No external libraries or frameworks should be used.
- The code should be modular and use classes.
- It is preferable, but not mandatory, to use web components.
- The code should be readable and maintainable by others than the author.
- It is preferable if the code is validated by ESLint.
- The code should be committed into a new git repository.