-
Notifications
You must be signed in to change notification settings - Fork 0
bobdutch/hand_dealing
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
= About Deal Hand is a ruby a console app that will first prompt the user for the number of players in a card game. Then it will prompt the user for the number of cards to deal each player. After that, it will simply print out the cards dealt to each player. = Running The Application The Deal Hand application requires that you have ruby in your path. It has been tested on OSX with ruby 1.8.7 and ruby 1.9.2. It does not require any libraries outside of the ruby standard library To Run, change directory to hand_dealing (from where the source was extracted) and run ruby deal_hand.rb Also it could be run from other directories ex. cd .. ruby hand_dealing/deal_hand.rb or if the file is executable ./deal_hand.rb The program will prompt you to enter the number of players and number of cards per hand. If valid input is given it will print the hands dealt to the players to standard out. * It will reprompt if invalid values are entered ex. (0, non-numerical values). * Input is cast to an integer ex. ("1.5" would become 1, "2 foo" becomes 2) * There is no limit to the number of players or cards per hand. Cards are dealt one at a time to the players starting with seat one. Therefore, if the number of players multiplied by the number of cards per hand is greater than 52 then the players will start with an uneven amount of cards = Running The Tests tests are in the test/ directory. You can run the test cases individually eg. ruby test/tc_player.rb or run the test suite which runs all of the test cases ruby test/ts_all.rb = Reading the documentation RDoc has been generated for this project you can read it by opening doc/index.html in your browser
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published