Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Vue.js 2 Web Development Projects

You're reading from   Vue.js 2 Web Development Projects Learn Vue.js by building 6 web apps

Arrow left icon
Product type Paperback
Published in Nov 2017
Publisher Packt
ISBN-13 9781787127463
Length 398 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
CHAU GUILLAUME CHAU GUILLAUME
Author Profile Icon CHAU GUILLAUME
CHAU GUILLAUME
Arrow right icon
View More author details
Toc

Rules of the game


Here are the rules we will implement in the game:

  • Two players play turn by turn
  • Each player starts the game with 10 health, 10 food, and a 5-card hand
  • The players can't have more than 10 health and 10 food
  • A player loses when their food or health reaches zero
  • Both the players can lose in a draw
  • During one player's turn, each player's only possible action is to play a card, which is then put in the discard pile
  • Each player draws a card from the draw pile at the beginning of the turn (except for their first turn)
  • Thanks to the two preceding rules, each player has exactly five cards in their hand when they start their turn
  • If the draw pile is empty when the player draws a card, the draw pile is refilled with the discard pile
  • Cards can modify the health and food of the player or their opponent
  • Some cards can also make a player skip their turn

The gameplay is built around the facts that players must play one and only one card each turn and that most of the cards will have a negative effect...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image