Logic Design Slot Machine

Even more so since players actually buying 'junk prime' for platinum means there must be SOME worth to it - just like I still have many 'damaged' mods equipped, simply 'damaged' is better than leaving a slot empty.The big problem is that everything that tells you about getting stuff to sell assumes you have uber-endgame gear and access to everything, and you just need the platinum to buy colors and stuff. Originally posted by:Trading with other players for platinum to get slots shouldn't be that hard.At the very least many people will buy any 5 junk primes for 5-10 platinum.That's still a big task.I've been wondering about this kind of stuff as well, considering that at least two of my weapons have passed the level 20 mark already (Excalibur as well), and I'm still on Venus. Right now I have 50 platinum, and I suppose those have to last until I actually have access to the farming. Of course, I'll have to kill that boss first.At this stage, 'any 5 junk primes' is just endgame talk for me. https://biblegol.netlify.app/how-to-free-up-weapon-slots-in-warframe.html. I don't think I have a single 'junk prime', and based on the 'prime' I'm not sure I'd want to sell my first 'junk prime' at all.

CS 115 Program 2 Slot Machine Fall 2020

Slot Machine Hacks

Due Dates:
Design and Test Cases: Friday, October 30, midnight
Source Phase I: Friday November 6, midnight
Graphics Source Phase II: Friday November 13, midnight

The graphics description is now posted for Phase II. 10/25/2020

Five

The same logic applies to slot machine games with progressive jackpots. The machine takes a small percentage of each bet to “fuel” that ever-increasing jackpot. The logic is that you face better odds at a game that doesn’t do that. Like some slots in Vegas, if you land on lets say a rocket in the center line, the machine would see the rocket and correct the wheel to spin backwards 1 spot (in the direction of the rocket as if the rocket was controlling the wheel).

Assignment total points = Design (20 points) + Answers for test cases (10 points) + Implementation Phase I (90 points) + Phase II (50 points) = 170 points

Free five reel slots downloads. Submit all program materials (.py files) with the Canvas link.

A reminder that you are allowed ONE classmate as apartner. Make sure that there are NOT more people involved from the class. You ARE allowedand encouraged to work with any TA or Dr. Keen.If you have a partner, make sure you reference them and they reference you or there will be a penalty.

The educational goals of this program are to use the concepts of

  • design with pseudocode
  • if, while loop and function control structures
  • random numbers
  • accumulators
  • self-written functions and how to document them
  • string comparison
  • input validation
  • testing with valid and invalid inputs
  • documentation
  • use Boolean operators
  • use the graphics library (graphics version)

A short reading about how to document a function

Your program will simulate a slot machine, a 'one-armed bandit'. You willlet the player enter their wager, use pseudorandom numbersto 'spin the wheels' on the machine,and calculate the player's winnings.

Play grand monarch slot machine online. The rules of the game:
The slot machine has 3 wheels with symbols of acherry, apple, banana, orange, melon, lemon, grape, a bell and a JACKPOT.There are 9 symbols on each wheel.A player wagers an amount of money (no more than they have!) (an integer).When the player 'pulls the handle', the wheels spin around,and then each one stops at one of the symbols.If some of the wheels come up with matching symbols, theplayer wins various amounts of money.

How the player wins:

  • If three JACKPOTS come up, the player wins 20 times the amountthey bet.
  • If three bells come up, they win 10 times the bet.
  • If any other symbol comes up three times, they win 3 times the bet.
  • If any symbol comes up just two times, they win twice the amountthey bet.
  • Otherwise they lose the amount they bet.

The game is ended in two ways: when the player says they don'twant to play any more, or when they lose all their money.The program should report the amount of money that the playerleaves with or that they are bankrupt.

Here is an example of the interaction between the user andyour program on the screen. These do not show any graphics, just text.

Another Example Run (Note the input validations):

Another Example Run (user loses it all):

There are two Phases to this program. The first phase usesjust text graphics as shown above.The second phase uses the graphics library.The graphics version is due a week after the text version.If you have thelogic worked out in the text version, the graphics version is MUCH easier.

Our Top Recommended Fastest Payout Casinos. Top Rated US Casino. 100K Free Coins & 200 Free Spins. 286 claimed this offer in the last month. The latest casinos with fast withdrawals on our blacklist. How We Test the Best Real Money Online Casinos. Fastest Pay Out /. Online casinos that pay out fast. High payouts and fast cash out times are an important part of what makes an online casino great. This is why we've put together a list of the best payout casinos, offering easy withdrawals in a. Fast paying online casinos in the US continue to grow in popularity. As this happens, the right banking methods obviously becomes a necessity. And when the proper banking methods are chosen, the ability for fast paying casinos in the US comes alive! US online casinos with fast payouts are out there, and we have done extensive research in.

Here is where a description of the graphics part is

Test cases and design do not need to consider the graphics part.

(20 points) Test Cases:

Complete this test plan for the program. These answers should be put in the file with the design at the bottom of the file and turned in at thefirst deadline.

We have to consider tests at different levels of detail.

  • Think about inputs from the user (lowest level detail).
  • Think about how to test the mechanisms of the game, the winning or losing.
  • Think about unit (function) testing (read the reading about functions).
These need different tables to organize. The results of tests will not be just outputs (numbers) but actions (“player loses”). Since the program uses random numbers, some of the actions are not directly controllable by the user. You can only control the program by inputs.
User enters invalid bet (low), pot is $50-5 'too small', user is prompted to enter a valid input, another input accepted User enters invalid bet (high), pot is $5075 'too much', user is prompted to enter a valid input, another input accepted
User makes another spinUser does not want to play again____A.__(the complete row)_ User gives invalid input____B.__(the complete row)_
User leaves the game with total winnings of first spinUser ends game after 2 spinsy, n ___C.____ Game ends because of bankruptcy bet equal to pot, loses all___D.____ User only wants to play one spinn when asked 'Play again?'user told how much they have, leaves the programUser wants to play two spins (Pot bigger than 55) 25, y, 30, n when asked 'Play again?' ___E.___ NOTE: same as C

Slot Machine Programming

No need for testing getaspin().

output prompt 'John do you want to play again?', returns Truenormal, input Y 'John','Y' output prompt 'John do you want to play again?', returns Truenormal, input n'Mary', 'n' ___F.____normal, input N'Mary', 'N' ___F.____invalid, then valid input'Sam', inputs t, pie, same, y ___G.___
bet too high 200, 300 outputs prompt, gives error message 'too much', asks for another betbet too low 200, -1 ___H.___
outputs 'three of a kind', returns 500Triple bell'bell','bell','bell', 50 ___I.__ Two of a kind 'apple','apple','cherry' ___J.___Losing spin 'apple','bell','cherry' ___K.___

(20 points) Design

Write the steps in pseudocode (NOT Python!) in comments in a Python file.Save this Python file as 'design2.py'.Submit this .py file through Canvas as usual.

The whole program has a prolog, at the top as usual, which discuss the whole PROGRAM(and the main function), just as we have always written.The 3 P's you write for the whole program count as being for the main function.

Each function definition, not just the main, must have a prolog.You write the three P's at the top of each function.The purpose of the FUNCTION, not the whole program,
the preconditions of the FUNCTION, which are the parameters (if any)and the input from the user (if any)
the postconditions of the FUNCTION, which are the outputs of the functionor actions or any return value.

As usual, give the types of these variables and their meaning. Don't say'two integer parameters', say 'two integers parameters, first one is height, second one iswidth', for example.

After the 3 P's of each function, you comment all the control structures you will use in the function to achieve the function's purpose.They are mostly very short functions, very few control structures.

(80 points) Implementation Phase I

There are some specifications that your program needs to meet.

  • Your code must be documented with the design. You must use meaningful variable names.
  • Your design comments must appear between the lines of code.
  • You must have a main function.
  • The output prompts and labels of your program MUST match theones given in the example runs.
  • Any library imports must be OUTSIDE the main function.
  • ALL variables must be defined and used INSIDE a function definition;global variables are not allowed!
  • Unnecessary typecasts should not be used.
  • Please use seed of 0 for starting your random numbers.
  • Make sure you eliminate any syntax and semantics errors. Use the test cases!
  • All guarantees of structured programming must be obeyed; that means NO breaks, continues or passes! Major penalties!
  • Each function has one return statement.
  • NOTE: you are not allowed to use recursion. This is any function calling itself. People do it becausethey do not know how to use a while loop. Your program has a while loop in the main function. There are more while loops in the other functions.

Five Line Free Slot Machines

Your program must have and use the following functions:
PLEASE use the names given for the functions!

Logic Design Slot Machine Machines

  • validate_yorn: has one parameter, a string which is the name of the player.The function asks the user (by name) if they want to play again. The function validatesthe user's input. They must enter either 'y', 'Y', 'n', or 'N' to be valid.All other inputs are rejected and more input is requested.The function returns True if the user entered y or Y, False if n or N.
  • validate_bet: receives a parameter, an integer which represents the pot.The function asks the user what they want to bet based on the size of the pot, and does input validation on that input.Numbers between 1 and the size of the pot, inclusive, are valid. Any other numbers arenot accepted. Numbers are either too high or too low, an appropriate error message is outputand more input is requested.The function returns the validated integer that is the bet.
  • getaspin: has no parameters.Returns a random string choice from the list ['cherry', 'apple', 'banana', 'orange', 'melon', 'lemon', 'grape', 'bell', 'JACKPOT']. Each choice is equally likely.
  • calculate_win: has 4 parameters, first 3 are strings which are the spin results, the fourth is the amount of the bet, an integer.The function uses the parameters to determine how much the user won (or lost). The rules described at the top of the assignment are used to determine whether the user winsor loses and how much they win or lose.No loops are needed, just logic. If the user lost the bet, the negative of the bet is returned.The amount won or lost is returned as an integer.