This is a boilerplate for Typescript
You will be expected to create your file in the src/index.ts
directory. To run this file simply:
npm i
npm run dev
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
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.