Skip to content
This repository has been archived by the owner on Jan 31, 2021. It is now read-only.

Commit

Permalink
Fix draw count
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyissillyyy committed Aug 17, 2018
1 parent 48423ec commit 35a50a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion structures/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ module.exports = class Player {

dealHand(deck) {
if (this.hand.size > 9) return this.hand;
for (let i = 0; i < 10 - this.hand.size; i++) this.hand.add(deck.draw());
const drawCount = 10 - this.hand.size;
for (let i = 0; i < drawCount; i++) this.hand.add(deck.draw());
return this.hand;
}

Expand Down

0 comments on commit 35a50a1

Please sign in to comment.