Skip to content

Blackjack #770

@mehabhalodiya

Description

@mehabhalodiya

Description

While building the game, one will explore a few handy Python concepts, such as object-oriented programming using classes and how to manage a game loop.

You have to use Python's random library, which has various functions used in generating randomness. In particular, employ shuffle, which takes any list and returns it in random order, to shuffle our deck of cards.

Initially, you can begin by defining the classes that will be used in order to separate out different aspects of the game of blackjack. You will model three of the components of the game:

  • Card: A basic playing card. The card belongs to a suit (hearts, diamonds, spades, or clubs) and is worth a certain value.
  • Deck: A collection of cards. The deck shrinks as cards are drawn and contains 52 unique cards.
  • Hand: Each player's assigned cards. A hand is what defines each player's score and thus who wins.
  • Chips: To keep track.

Further, create all the list of functions which perform various actions and finally, the game loop!

Aim

One will get proper understanding of OOPS (Object-Oriented Programming System) by implementing this type of script as it contains classes and functions from scratch.

Metadata

Metadata

Labels

C++JavascriptLGMSOC21This issue will be considered for LGM-SOC 21Pythongood first issueThis issue is good for first timers🟧 Level3This issue will be considered as level 3 issue for LGM-SOC 21.Points will be 25.🤩 Up for GrabThis issue will is not assigned ! Grab It !

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions