Skip to content

Wacky hidden ways to guess; ruleset created in yaml#178

Open
h-anjru wants to merge 2 commits intomasterfrom
daily-game-update
Open

Wacky hidden ways to guess; ruleset created in yaml#178
h-anjru wants to merge 2 commits intomasterfrom
daily-game-update

Conversation

@h-anjru
Copy link
Copy Markdown
Collaborator

@h-anjru h-anjru commented Aug 1, 2024

  1. New wacky ways to guess are added (but not mentioned in help text):
    • Evaluate simple math expressions
    • Sum of letters' numeric values $[a=1, b=2, ..., z=26]$
  2. Ruleset created in data/games/rules.yaml:
    • Random titles for embeds
    • Award amounts

@h-anjru h-anjru requested a review from williammck August 1, 2024 18:59
Comment thread crimsobot/utils/games.py
# https://stackoverflow.com/a/65945969

# Kept outside simple_eval() just for performance
_re_simple_eval = re.compile(rb'd([\x00-\xFF]+)S\x00')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notes from looking into this:
d = LOAD_CONST (decimal: 100, hex: 0x64, ascii: d)
two bytes specifying the index of the const, uses system endianness
S = RETURN_VALUE (decimal: 83, hex: 0x53, ascii: S)
null-terminated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants