The initial hand

At the beginning of the game, each player draws some cards.

  1. In the utils.js file, there is a function that draws the hand of a player:
      drawInitialHand(player)
  1. In the main.js file, add a new beginGame function that calls the drawInitialHand function for each player:
      function beginGame () {
state.players.forEach(drawInitialHand)
}
  1. Call this inside the mounted hook of our main component in the main.js file, when the app is ready:
      mounted () {
beginGame()
},
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.255.116