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

Couple of fixes and subjective improvements #1

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

z33ky
Copy link

@z33ky z33ky commented Mar 10, 2024

Hey, I just wanted to notify you about some changes I have made.
Rather than looking at the complete diff it'll be easier to view each commit in isolation. Most commit messages also have justifications for the change, though some "improvements" are certainly just a matter of taste.

Feel free to merge, cherry-pick or outright ignore.
I'm happy to answer questions or address concerns as well.

P.S.: Nifty use of Unicode characters for the items :)

z33ky added 12 commits March 10, 2024 19:55
It's quaint to override the sleeps for testing purposes...
print() emits spaces between arguments, which resulted in the first line
being off.
Default arguments are passed by reference. The same empty list was thus
assigned to both Player and AI inventory and modification to one was
visible for the other. This is unintended.
This resulted in random.choice() raising an IndexError if the AI's
inventory is empty.
The game does not state that the dealer dies upon losing.
The game mistakenly claimed the player died if the AI dropped to -1
health due to the saw.
This fixes the issue.
Buckshot Roulette caps the health. Smoking does not increase health
points beyond the maximum.
Like Buckshot Roulette, both players now get an equal amount of items.
Like Buckshot Roulette, add new items on round start to the players'
inventories.
It's easier to read/keep track of the items.
The game has less first-mover advantage with fewer items.
I don't know the probabilities that Buckshot Roulette uses, but to me it
makes sense to make 2 the likeliest, 1 and 3 less likely and 4 the least
likely.
useItem('🔍') will also automatically shoot the gun. On a blank round,
the AI is intended to point the gun towards itself, which works fine. If
a live round is found, the AI is intended to point the gun towards the
player, optionally doubling damage beforehand.
Since `effector` has not been set previously, the AI would shoot itself
with a live round though. This is fixed by passing the player as
`effector` when the AI uses 🔍.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant