-
Notifications
You must be signed in to change notification settings - Fork 39
Uno partially implemented (75% ish) #104
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
base: feature/uno
Are you sure you want to change the base?
Conversation
This commit adds the file and beginning code for roulette. When the user enters the casino, they may choose roulette and be greeted with a roulette sign.
Adds `play_roulette()` function in `roulette.py` to the global namespace. NOTE FOR FUTURE MAINTAINERS: Please use something else other than the global namespace when accessing functions. USE OF THE GLOBAL NAMESPACE SHOULD BE AVOIDED FOR SECURITY REASONS.
REASON: Python does not declare data types like other programming languages do. Placing a generic `type` before the variable name will raise an error. This is why it is being removed.
…to roulette_wheel
Make comments more clear in `Roulette.__init__()`
Add a "spin wheel function" to the `Roulette` class that randomly picks an index on the wheel
`AmericanRoulette` inherits from `Roulette` class. It will store its rules inside the class.
Add values found in standard American roulette wheel
This commit moves the warning message to not run `roulette.py` as main to the top of the file. The bottom of the file contains ``` if __name__ == "__main__": ``` However, this line is never run because these import lines: ``` from casino.card_assets import assign_card_art from casino.types import Card from casino.utils import clear_screen, cprint, cinput import casino.accounts ``` will raise an error.
Adds function that lets users submit bets for all `accounts` in the `Roulette` class
Adds a `"""` that wasn't present in `Roulette.submit_bets()`
Adds `Roulette.roulette_sort_key`. Helper function that sorts roulette string values found in `Roulette.wheel` when using the built-in `sorted()` function
Adds two variables that determine the valid colors and numbers of a wheel.
Made deck size modular and user input dependent. For now this can effectively serve as difficulty because higher deck values mean counting cards becomes more and more difficult if not impossible.
Changes `bets` from tuple to dictionary.
Ensures all values use the full, lowercase name for clarity.
For example, instead of:
```
{"color": "r"}
```
the output is
{"color": "red"}
refactor: Refactor card deck handling
FIX for issue ufosc#66: Edited theme prompt to signify default selection
…n-menu Feature/enhanced main menu
Test - Fixes ufosc#91
…t colors, changed formatting to match Blackjack, created roulette table
…ncise code, fixed issue of printing order by doing so
seperated logic of printing game to a function for more clrear and co…
Added double down mechanic to blackjack game, as requested in issue ufosc#85.
Implement insurance mechanic in Blackjack (ufosc#83)
Stylized Roulette (Issue ufosc#9)
Slots Visualization
FIX / POKER - Clear screen on raise (Issue ufosc#61)
|
I noticed that this PR has a lot of commits and that a lot of files have been changed (including code files for other games). This PR needs to be culled so that it only modifies files related to Uno. It could also just be an issue related to merging because it is similar to PR #34. |
|
Kevin, I think this is because the feature/uno branch is behind the main branch. I didn't make most of the changes that are in the pull request, they are just things that I pulled from main. The stuff I personally wrote to add was 95% in the casino/games/uno directory and I didn't use AI that would go and change a ton of other stuff without me realizing. I could totally be wrong because it's been a few weeks since I wrote the code but I think this could be fixed if this branch was updated to include most of the stuff in main. |
Most base mechanics are implemented but it is rough around the edges. Uno now uses the new-ish card classes and ASCII art. Special cards mechanics (skip, reverse, +2/+4, and wild) are not yet implemented and that's what I am working on next. I have not yet seriously tested for any bugs, so there may be a couple with the current implementation.