An open API service indexing awesome lists of open source software.

https://github.com/usmantahirr/fruit-machine-solution


https://github.com/usmantahirr/fruit-machine-solution

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

          

# Typescript Pairing Test Boilerplate.

This is a boilerplate for Typescript

### How To Run The File:

You will be expected to create your file in the `src/index.ts` directory. To run this file simply:

`npm i`

`npm run dev`

### How To Run The Test Suite:

You can run tests for your `src/index.ts` file, which is located in the `src/index.spec.ts` directory. To run this file simply:

`npm run test`

# Question

We are going to create a virtual fruit machine. To make things easier instead of symbols we are going to use colours: black, white, green, yellow.

Each time a player plays our fruit machine we display four 'slots' each with a randomly selected colour in each slot.

If the colours in each slot are the same then the player wins the jackpot which is all of the money that is currently in the machine.

Implement a basic machine, along with the concept of a player who has a fixed amount of money to play the machine.