The goal of this task is to create a version of the game 'Rock, Paper Scissors' in the browser.
- Ability to play against the computer
- Ability to simulate a game (Computer vs Computer)
- Ability to restart the game
- Computer generated plays need to be random
- Correctly implemented rules
You should:
- Support multiple browsers
- Use vanilla JavaScript or Typescript
- Write unit tests
- Use modern styling and features, e.g. SASS, CSS in JS, etc.
- Use only ES2015+ syntax
- Use Semantic HTML
You should not:
- Submit a solution with compilation/runtime errors
- Submit a solution with failing unit tests
Your solution should be clear and easy to understand, consider using popular software principles such as DRY, KISS, SOLID etc.
Try to avoid unnecessary complexity and over-engineering.
The user interface can be as simple or as complex as you wish, however, you will be marked on:
- Responsive Design
- Accessibility
You will not be marked on your design choices.
Your solution should be easily extendable to include additional rules.
For example: http://en.wikipedia.org/wiki/Rock-paper-scissors-lizard-Spock
We provide the following tooling:
webpack
to modularise your Javascript codebabel
to utilise ES2015+ featuresnode-sass
to modularise your styling via SASSeslint
to make sure your code meets the standardsjest
to help you write and run your unit tests
# Install the dependencies
yarn install
# Run solution (http://localhost:8080)
yarn dev
# Run the unit tests
yarn test
# Run the linter
yarn lint
Please fork/clone the repository, commit your changes and then send us a link to your work
This repository should not have any bugs. If you do find any, please report them back to us.
We look forward to your submission, happy coding! :)
The Gumtree Engineering team