GithubHelp home page GithubHelp logo

blackjack's Introduction

---PEP8 formatted, mypy type tested---

cards.py includes class definitions of:
	a Card 	[with rank and suit]
	a Deck	[with a list of cards]
	a Player	[with a name and hand]
	a Game	[with a Deck, players, discard pile, hand size, and winner]
methods include: 
	dealing to players the handsize number of cards
	drawing 1 card from a deck
	discarding a card to a discard
	playing a card [effects of playing a card not implemented]
	sorting a deck
	shuffling a deck
	more
MAIN DEMONSTRATES VARIOUS EXAMPLES AND USAGES



blackjack.py uses the cards classes to make a class:
	Blackjack which contains: 
		a Game with Dealer added
		a current player
methods include:
	hitme [ draw a card to a player's visible hand ]
	stay   [ move to next player without taking card]
	dealer stay [ end round ]
	display results [ show all hands, calculate winners/losers]
MAIN demonstates a  running game
	use command: python blackjack.py x <-x is the number of players
	type hit/stay/exit to take cards and move through players
	type y/n at end of round to continue indefinitely 
		[discard pile is reshuffled if empty, card counting is possible]
	
	


blackjack's People

Contributors

wmjg-alt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.