text-based-python-project

Project 2 – Retro Arcade

Overview

Novel Entertainment Systems (NES) has identified an underserved demographic in the modern era of gaming, the text console users. As a software developer for NES, you have been asked to develop a text-based gaming platform named “Retro Arcade” to help address this oversight. The gaming system will initially provide two games: dice and slots. The system will start the player with 100 credits. The cost to play a game is 10 credits. To earn more credits, the player can generate Madlibs for 20 credits each. Players will be able to select Dice, Slots or Madlib from a menu and their credit balance will be updated accordingly.

Specification (150 total points)

This project will be implemented as four separate components to make the development process easier. The first three components will be to implement the dice, slots and madlib games respectively. The final component is to develop the game loop, credit accounting and menu system to allow the player interact with the game. Please read the requirements for each component carefully because the success of this project is going to depend upon being able to combine the individual components together to make a working solution.

  • Game Components (120 points)

    • Dice Game
    • Slots Game
    • Madlib Game
    • Game Selection Menu
  • Code Style (10 points)

    • Comments
      • Header with name, date and description
      • Section comments
      • Function comments with details of what the function does and descriptions of each parameter and what (if anything) is returned
    • Function and variables names should use the camelCase naming convention
  • Code Review (20 points)

    • You must ask another student to review your composition (10 points) AND you must review another student’s composition (10 points).
    • Use the Retro Arcade Project Checklist. Complete the “Owner” section for your own project to make sure you’ve met the project requirements, then ask a classmate to complete the “Reviewer” section on your project as well. The reviewer must print and sign their name on your Checklist for you to receive credit for the code review.

Component One – Dice Game

This game is player vs computer where each take turns rolling a single six-sided die. The player with the highest roll each round wins a point. The computer receives the point for a tie. The first player to 5 points wins.

Requirements (30 points)

  • This game should be implemented as a single custom function named playGameOfDice() and it should take a single String parameter containing the player’s name. The return value of playGameOfDice() is True if the player wins, false if the house wins.
  • The game should begin by displaying a welcome message including the name of the game (Dice) and the player’s name.
  • The game should have a variable for tracking the player’s score and a variable for tracking the house’s score. The game will continue while the player’s score is less than 5 and the house’s score is less than 5.
  • For each round (inside the loop body)
    • Print the current scores
    • Prompt the player to “Press Enter to roll”
    • Randomly generate integer value for player’s roll
    • Randomly generate integer value for house’s roll
    • Compare results, print winner message, including name and increment the score of the winner
  • If the player reaches five points before the house, return True. Otherwise, return False

A starter Python file for Component One is provided at the link below:

https://github.com/BoiseState/CS111-resources/blob/master/projects/cs111-project2-component1-stub.py

Component Two – Slots Game

This is a single player game where the player has five attempts to randomly select three items and match all three. If the player draws three matching items, then the game is over and the player wins. If the player completes five attempts without drawing a match, the game is over and the player loses.

Requirements (30 points)

  • This game should be implemented as a single custom function named playGameOfSlots() and it should take a single String parameter containing the player’s name. The return value of playGameOfSlots() is True if the player wins, false if the house wins.
  • The game should begin by displaying a welcome message including the name of the game (Slots) and the player’s name.
  • The game should have a variable to track the number of attempts. The game will continue while the number of attempts is less than 5 and the player hasn’t won.
  • For each round (inside the loop body)
    • Print the number of attempts
    • Prompt the player to “Press Enter to pull the handle”
    • Randomly select three values from a List containing game symbols
    • Print the selected symbols on a single line with several spaces between each character
    • Check to see if all three selected symbols match. If so, return True
  • If the player reaches five attempts without winning, return False

A starter Python file for Component Two is provided at the link below:

https://github.com/BoiseState/CS111-resources/blob/master/projects/cs111-project2-component2-stub.py

Component Three – Madlib Creator

This is a game where a story is story is dynamically created by filling in details using randomly selected words from Lists and/or by prompting the player for specific details.

Requirements (30 points)

  • This game should be implemented as a single custom function named createMadlib() and it should take a single String parameter containing the player’s name. The createMadlib() function will return a String containing the newly generated Madlib
  • The game should begin by displaying a welcome message including the name of the game (Madlib) and the player’s name.
  • The story template may be selected from one of the provided Madlibs or it can be an “original” work, provided that there are at least 6 dynamically set values.
  • A String containing newly generated Madlib (filled in with randomly selected values) should be returned each time the createMadlib() function is called. The returned String should be stored to a variable and printed to the console.

A starter Python file for Component Two is provided at the link below:

https://github.com/BoiseState/CS111-resources/blob/master/projects/cs111-project2-component3-stub.py

Component Four – Selection Menu

The selection menu will be core component that ties all three individual games into a single program. It contains the primary game loop that will continue running until the player either selects (Q)uit from the selection menu or the player runs out of credits. Selection menu contains options for (D)ice, (S)lots, and (M)adlib. When the player selects a game, the appropriate number of credits will be deducted from or added to the credit balance. The player begins with 100 credits.

Requirements (30 points)

  • The program begins by prompting the player for their name. It will then print a message welcoming the player by name to Retro Arcade. It will also display their current balance.
  • The player will be presented with a menu containing the following options:
    • (D)ice
    • (S)lots
    • (M)adlib
    • (Q)uit
  • The player must enter D,S,M, or Q. If they enter something else, simply display the game selection menu again.
  • Once the player has selected their game, deduct or add the amounts below to their credit balance.
    • Dice – deduct 10 credits
    • Slots – deduct 10 credits
    • Madlib – add 20 credits
  • If the player selects the (Q)uit option or runs out of credits, exit the primary game loop and print a message thanking the user for playing.

A starter Python file for Component Four is provided at the link below:

https://github.com/BoiseState/CS111-resources/blob/master/projects/cs111-project2-component4-stub.py

Get 15% discount on your first order with us
Use the following coupon
FIRST15

Order Now