Skip to content

Lkikui/DeckOfCards-Swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DeckOfCards-Swift

Basic structure of matching card game

Features:

  • struct "Card" with properties for card color and die roll associated with card color
  • struct "Deck":
    • deals card on the top of the deck and returns its value
    • checks if deck is empty
    • randomly reorders the deck's cards
  • struct "Player":
    • draws card from deck, adds it to their own hand, and returns its value (passing by reference)
    • rolls dice (returns random number between 1 and 6)
    • counts all the cards the player has which matches a given card and roll

About

Basic structure of matching card game

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages