added demo game in chris_demo

You had some really clear planning in your commit message--
In the "chris_demo" folder I implemented a bunch of what
you planned. I suggest playing the game I built
(go into chris_demo and run python game.py), and then
carefully reading all the source code. Then, if you like
the patterns I used, copy or move whatever you want
to use into your main project folder. Also, if there
are parts of my code you don't understand, please let
me know (in a commit message or in person next time
I'm in class) and I'll be happy to explain it.
This commit is contained in:
Chris Proctor
2025-12-19 15:38:03 -05:00
parent 95ae6740d3
commit b8e92eedcf
7 changed files with 265 additions and 0 deletions

11
chris_demo/game.py Normal file
View File

@@ -0,0 +1,11 @@
from retro.game import Game
from dealer import Dealer
dealer = Dealer((1, 1))
state = {
"score": 0,
"options": "h to hit or s to stay",
}
game = Game([dealer], state)
game.play()