项目作者: Nabeel-etx

项目描述 :
Pick coins from the basket, last to pick loses.
高级语言: JavaScript
项目地址: git://github.com/Nabeel-etx/Coin-Pick-Game.git
创建时间: 2020-02-11T20:45:07Z
项目社区:https://github.com/Nabeel-etx/Coin-Pick-Game

开源协议:

下载


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!