Skip to content

Commit

Permalink
fix: first card is now random.
Browse files Browse the repository at this point in the history
  • Loading branch information
vetom committed Jan 2, 2019
1 parent 8669df7 commit cfb230f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "airbnb-base",
"rules": {
"indent":[2, 4],
"indent": [2, 4],
"comma-dangle": "off",
"no-plusplus": "off"
},
Expand Down
2 changes: 1 addition & 1 deletion src/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cfb230f

Please sign in to comment.