From cfb230f97edd2abd4b3ee7c70733cc7574e9f03a Mon Sep 17 00:00:00 2001 From: Tomas Veras Date: Wed, 2 Jan 2019 19:08:30 -0400 Subject: [PATCH] fix: first card is now random. --- .eslintrc | 2 +- src/game.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index bac55c3..8b6790a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,7 +1,7 @@ { "extends": "airbnb-base", "rules": { - "indent":[2, 4], + "indent": [2, 4], "comma-dangle": "off", "no-plusplus": "off" }, diff --git a/src/game.js b/src/game.js index dddde9c..db18cd1 100644 --- a/src/game.js +++ b/src/game.js @@ -98,7 +98,7 @@ function addCardToDeck(isNegative) { function setGame(players, classifiedCards) { resetValues(classifiedCards); // get first card randomly - let playersAdded = addCardToDeck(getRandom(0, 1)); + let playersAdded = addCardToDeck(Math.round(Math.random())); while (playersAdded < players) { const added = addCardToDeck(game.weight >= pivot);