Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #1

Open
wants to merge 19 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 38 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,70 @@

:warning: Everything between << >> needs to be replaced (remove << >> after replacing)

# << Project Title >>
## CS110 Final Project << Semester, Year >>
# Pyramid Scheme Simulator
## CS110 Final Project Spring, 2024

## Team Members

<< List team member names >>
Steven Doljansky

***

## Project Description

<< Give an overview of your project >>
Pyramid scheme simulator. Run and manage your own pyramid scheme. Will you pay off your devastating financial obligations in time? In this project the player has to pay off $150,000 in debt in 7 minutes by recruiting people into their pyramid scheme. To recruit people, click the button 10 times. 1 person generates $1/sec. Then continue clicking the button for exponential growth. 2 people in your scheme makes it so that each person makes $2/sec bringing the total rate for 2 people to be $4/sec. To pay off the loans and transfer balance amount click the Pay button. Good luck!

***

## GUI Design

Top window showing monetary obligations (unpaid loan amount), balance, and time left.
Person on the left side of the screen with x(int) amount of people showed. This is the amount of people that are working for you.

Timer in the right side top of the screen of 7 minutes countdown that starts as soon as player hits play.
Click button 10x to hire first person and make $1 per person per second.
Once you have money in your balance you can hit the pay button to deduce that amount from your loan.
Continue hitting button 10x for hiring more people for exponential growth in rate of money being added to your balance.
2 people make $2 per person per second.
3 people make $3 per person per second and so on.



### Initial Design

![initial gui](assets/gui.jpg)

### Final Design

![final gui](assets/finalgui.jpg)
![final gui](assets/fgui1.png)
![final gui](assets/fgui2.png)

## Program Design

### Features

1. << Feature 1 >>
2. << Feature 2 >>
3. << Feature 3 >>
4. << Feature 4 >>
5. << Feature 5 >>
1. Start Screen Before Game/Timer Starts
2. Countdown Timer
3. Button (clicker to hire next employee) (10 clicks for +1 employee)
4. Visual Representation of How many people are working for you
5. Stonks background
6. Balance amount
7. Pay button to transfer money from balance to financial obligations

### Classes

- << You should have a list of each of your classes with a description >>
Models: Constructs the initial loan_balance (your initial balance which would be 0) as well as the initial debt obligations in loan_amount (150,000) and the initial amount of people in the pyramid scheme (0)

Controller: Contains multiple functions such as how the game will be running, initializes the timer, handles the blitting of the images like the background and buttons. Constructs a clickable button. This constructs how the buttons would look like and for the detection of a click of the button. It also explains to the computer that these buttons will have a set position. It also handles the win and lose screen and the rate at which you will make money via how many times the button was clicked and how many people are working in your scheme.

## ATP

| Step |Procedure |Expected Results |
|----------------------|:--------------------:|----------------------------------:|
| 1 | Run Counter Program |GUI window appears with count = 0 |
| 2 | click count button | display changes to count = 1 |
etc...
|----------------------|:--------------------:|-----------------------------------------------------------------:|
| 1 | Run main.py |game display opens. tutorial box is visible. Esc closes program |
| 2 | Click play button |GUI opens. Timer starts from 7 min. 150,000 in Loans $0 balance. Option to pay button |
| 3 | Click button 10x |Number of people goes to 1. $1/sec added to balance. |
| 4 |Continue pressing btn |Every 10 times one person added. 2 people rate $2/sec per person $4/sec total|
| 5 | Continue pressing btn|Balance grows exponentially |
| 6 | If esc at any point |Tutorial display opens back up. Progress not saved. Another esc closes program|
| 7 | Press pay loan |Deducts balance and deducts loan amount. If loan paid then win screen |
| 8 | Timer runs out (unpaid) |Lose screen |
| 9 | Loans paid for |Win screen |
Binary file added assets/Stick_Fig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/class_diagram.jpg
Binary file not shown.
Binary file added assets/class_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/fgui1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/fgui2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/gui.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/imagebutton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions etc/ATPexample.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# My project
##ATP
### Test #1

- Step 1: Start Game
-Open terminal, go to project folder, tyoe:
-'''python
python main.py
'''

- Click on start button
- **Expected Outcome**
- Character appears in the middle of the screen
he
12 changes: 12 additions & 0 deletions etc/moduloex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import pygame

x = 0
y = 10

while x < 100:
x = x % y #= who cares, what's the remainder
#event loop
if x % y ==0:
print("clicked")

x += 1 #event loop
13 changes: 4 additions & 9 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import pygame
#import your controller
import sys
from src.sample_controller import Controller

def main():
pygame.init()
#Create an instance on your controller object
#Call your mainloop

###### NOTHING ELSE SHOULD GO IN main(), JUST THE ABOVE 3 LINES OF CODE ######

# https://codefather.tech/blog/if-name-main-python/
if __name__ == '__main__':
main()
controller = Controller()
controller.run()
Binary file added src/__pycache__/models.cpython-310.pyc
Binary file not shown.
Binary file added src/__pycache__/sample_controller.cpython-310.pyc
Binary file not shown.
Binary file added src/__pycache__/thebutton.cpython-310.pyc
Binary file not shown.
6 changes: 6 additions & 0 deletions src/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class Models:
def __init__(self) -> None:
self.loan_balance = 0
self.loan_amount = 150000

self.people = 0
Loading