At the beginning of the game, each player draws some cards.
- In the utils.js file, there is a function that draws the hand of a player:
drawInitialHand(player)
- In the main.js file, add a new beginGame function that calls the drawInitialHand function for each player:
function beginGame () {
state.players.forEach(drawInitialHand)
}
- Call this inside the mounted hook of our main component in the main.js file, when the app is ready:
mounted () {
beginGame()
},