Skip to content

Commit

Permalink
Solving reviewer comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
strinsberg committed Jun 30, 2020
1 parent 647af17 commit 82af70d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/classes/game/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* @author Steve modified on 2020-05-25
*/

// Function to create a unique object id
const uuidV1 = require('uuid/v1')

/**
Expand Down
1 change: 1 addition & 0 deletions src/classes/game/CyberEffect.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* @author Steve on 2020-06-18
*/

// Function to create a unique object id
const uuidV1 = require('uuid/v1')

/**
Expand Down
10 changes: 5 additions & 5 deletions src/classes/game/Deck.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ export default class Deck {
constructor () {
this.cards = []
this.discard = []
this.addCards(cardTypes)
this.addCards(cardTypes, 4)
}

/**
* Initializes the deck with a pre determined number and type of cards.
* Shuffles the deck.
*/
addCards (cardsToAdd) {
addCards (cardsToAdd, shuffles) {
for (let [type, values] of Object.entries(cardsToAdd)) {
for (let [value, number] of Object.entries(values)) {
for (let i = 0; i < number; i++) {
Expand All @@ -56,9 +56,9 @@ export default class Deck {
}
}
// Shuffle a few times to try and get a good random order
this.shuffle(this.cards)
this.shuffle(this.cards)
this.shuffle(this.cards)
for (let i = 0; i < shuffles; i++) {
this.shuffle(this.cards)
}
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/classes/game/Stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* @author Josh on 2017-03-13, Steven modified on 2020-05-25
*/

// Function to create a unique object id
const uuidV1 = require('uuid/v1')

// The maximum number of repeats allowed in a stack
Expand Down
2 changes: 1 addition & 1 deletion src/components/game/PlayField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<p>Virus cards can be dragged onto any opponent stack that is highlighted red.
Stacks with a Virus card on top will not be able to be added to. Those
started with instructions cards will be worth 0 points and those started with
Group cards will be woth 50%. Virus cards can be removed with Antivirus and
Group cards will be worth 50%. Virus cards can be removed with Antivirus and
Scan cards to restore your stacks full value</p>
<p>The scores from each stack are added up to help the player reach the score total.</p>
</info-popup>
Expand Down

0 comments on commit 82af70d

Please sign in to comment.