Skip to content

Making a better poemgame#68

Merged
Bronya-Rand merged 5 commits intopython-3from
py3-better-poemgame
Apr 17, 2023
Merged

Making a better poemgame#68
Bronya-Rand merged 5 commits intopython-3from
py3-better-poemgame

Conversation

@Bronya-Rand
Copy link
Copy Markdown
Owner

@Bronya-Rand Bronya-Rand commented Mar 20, 2023

This PR does the following

  • Makes an attempt to improve the poem game from Dan's code using Screens than ui.X functions
  • Makes an attempt to improve the poem game from Dan's python code using Classes and inheritance.
  • Adds the ability to add more characters easily using the Chibi class (or ChibiTrans if you don't need points).

This still requires some code editing for screens and points however. See the new guide in Documentation for more information.

  • More efficient poem word storing via dictionaries.

(Elk, if by any chance you read this PR, get some water and a pillow because you might rage at this.)

@Elckarow
Copy link
Copy Markdown
Contributor

breathes in... and out

if it works, then go for it
there are a couple things that i ain't happy with tho

image

-the exec part straight up won't work.
instead of storing the appeals in a list, add a new parameter name to the Chibi constructor and store the object in a dict with the name as its key. that way you can replace this ugly exec with chibis[ch1_choice[0]].charPointTotal += 5

-goofy ahh sorting code
poemwinner[chapter] = max(chibis, key=lambda c: chibis[c].charPointTotal ) works way better (with the dict thing i talked about just before)
plus the code won't work if there are more than 3 appeals

@Elckarow
Copy link
Copy Markdown
Contributor

Elckarow commented Mar 20, 2023

plus the code won't work if there are more than 3 appeals

the code you wrote....
just clarrifying

@Pseurae
Copy link
Copy Markdown

Pseurae commented Mar 20, 2023

This is a much needed change, and I'll contribute however I can because the vanilla code is just painful to look at
Maybe you could salvage something from this incomplete mess
https://github.com/dokimods/poemgame

@Elckarow
Copy link
Copy Markdown
Contributor

i've already sent this to weiss alsongside the new poem response system
here, if you wanna have a look pseurae

new_poemgame.zip

@Bronya-Rand Bronya-Rand merged commit f9c06ed into python-3 Apr 17, 2023
@Bronya-Rand Bronya-Rand deleted the py3-better-poemgame branch April 17, 2023 19:24
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.

3 participants