Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 597 Bytes

README.md

File metadata and controls

15 lines (10 loc) · 597 Bytes

Coin-Pick-Game

This is a very simple 2-player game made on CodeSandBox. It is inspired by a really old interview question I read once.

Question (not exactly): There is a basket full of coins, each player can only pick 1-5 coins at a time. Last person to pick loses the game. Write a solution to display winner of this game.

INSTRUCTIONS: There are two players, A and B, wait for your letter box to turn BLUE then collect coins. Number of coins in the basket at the start is a random number in the range(10-50).

Pick a number, [1-5], such that you are not the last person to pick.

ENJOY!