Skip to content

Latest commit

 

History

History
71 lines (70 loc) · 3.41 KB

TODO.org

File metadata and controls

71 lines (70 loc) · 3.41 KB

Tests To write:

[x] Player Stands [x] Rename computer hand to dealer hand [x] Create a context with cards [x] Dealer plays hand (stands on all 17) [x] Player gets 21 on their hit (automatically plays to end) [x] Fix Dealing order - you flubbed it [x] Dealer gets natural blackjack - insta-lose player can’t hit - better message / state? [x] Player busts - dealer doesn’t deal cards [x] You lost a game with 21, how did that happen? [x] Transition from win/lose/draw to next hand (new, shuffled deck) [x] Better messages for player blackjack and dealer blackjack.

Console UI

Test Cleanup

[x] Fix all “unused” warnings, move functions that are only in tests to tests

Deal Two Hands on New Deal Button

Show the actual cards dealt

Construct the resource name from the card type

Deal the cards relative to each other (shifting to the ‘right’)

Show player and dealer hands

Create a “hand” scene and place both on the screen, dealer on top, player on bottom

Hide the hidden card

REFACTOR!

Extract functions for the duplicate code

Reconsider naming (yet again)

Test the code that calculates the position of the card

Get Command-line game working

Create a workspace with godot separate from game lib

Remove all gdnative from blackjack lib

Point godot-blackjack at blackjack lib (in toml)

Get godot-blackjack compiling

Update Godot resources to match, and have GUI build

Make main.old back into main.rs and see it running again

Move godot code out of lib

Player Interaction

Hit me!

HOLD Extract a utility library for Godot

  • I use a couple functions regularly and I think I want to make them a helper crate that I just always use. But they are probably not ready-for-prime-time yet.

Have the cards be “dealt” in

Don’t deal the next card until the previous is dealt! Async?

Put the animation as a node in the scene

  • Simply hide/show it.

Pass a vector to a “deal_cards” functions

Run an animation for one card
Pass the remaining list of cards to the animation functions
Animate the next dealt card
Animate to the right spot
Animate dealing the hole card for the dealer

HOLD Maybe pull the script out and attach it to the card

Maybe try Tweens instead of the animation player

See if we can add rotation to the tween
Sequential Tweens so they wait one at a time
In the case statement prepare the tweens rather than start them.
Store the list of “tweens to play”
Play the first tween, with “card dealt” as the signal to be called
On card dealt, deal the next card
Delay so cards come one at a time?

Remove warnings for unused code

Remove duplication of state machines!

Make sure you say when the player/dealer has blackjack (new action)

Say when the dealer busts

Showing the dealer hole card requires the context

Bug! Player can win by drawing 21, without dealers chance to tie.

Cleanup Result and Option types that just unwrap or expect

HOLD Make winning text fun!

Ditto New Game/etc buttons

Refactor to use a UI node

Get cool fonts

HOLD Refactor game states to be mut self so they don’t require cloning

HOLD Make the felt look like …felt