ACEY DUCEY ====================================================================== # LANGUAGE IDE - --------- ---------------------------------------------------------- 01 Ada GNAT Studio 02 BASIC PC-BASIC (GW-BASIC) 03 C\C++ Visual Studio 2019 04 C# Visual Studio 2019 05 COBOL OpenCobolIDE 06 Java Eclipse 07 Lua ZeroBrane Studio 08 Pascal Turbo Pascal 09 Perl Padre 10 PowerShell Windows PowerShell 11 Python Idle 12 VB .NET Visual Studio 2019 ---------------------------------------------------------------------- In Acey Ducey, a deck of 13 cards is used all cards are of a single suit (so none required). The game starts with two cards dealt from the deck. The player starts with $100 and may bet on the next card. The bet is that the next card will be between the two dealt cards. The player may decide to skip, and not bet, but the card that would be bet upon, is still revealed. If the card that is revealed is between the two dealt, the player wins the amount they bet, otherwise they lose the amount they bet. The game continues until either 52 cards have been used or the player loses all their money. ---------------------------------------------------------------------- Psuedo-Code Display Title and rules While the program is running Give the player $100 While the game is active Shuffle 13 cards (2-Ace) into a playing deck while there are still cards to deal Deal the first two cards Ask the player for their bet (0 = skip) Deal the next card If the this card is between the previous two cards Increase the player's cash by the amount they bet else Decrease the player's cash by the amount they bet If the player is out of cash game is over (break out of game is active loop) Go back to Shuffle line (3 more times) Ask the player if they want to play again If they say YES Game is active Else Say good bye and set program to not running PAUSE BEFORE EXIT (display Press ENTER to QUIT) ---------------------------------------------------------------------- Common Functions Desired NAME PURPOSE --------------- ----------------------------------------------- IsAnInt Determines if a string is an integer IsNumeric Determines if a string is a number GetIntInput Gets an input of an integer from the user GetNumericInput Gets an input of any number type from the user DisplayRules Displays the rules of the game AskToPlayAgain Asks the user if they want to play again GenerateRandomNumber Generates a random number between min and max ShuffleDeck Shuffles a deck of cards (single suit or full) PressEnterToQuit Displays "Press Enter To Quit" and taks input These functions may be incorporated into a common library in languages that support this. ======================================================================