4 ms·
Very nice. Any plans on open-sourcing this? I'm a newbie at blackjack and have been wanting to build a similarly minimalistic version adding a "strategy feedbac
by kimar 7y ago
Very nice. Any plans on open-sourcing this? I'm a newbie at blackjack and have been wanting to build a similarly minimalistic version adding a "strategy feedback" mode to help me memorize basic strategies.
- Amorymeltzer 7y agoI've got a simple blackjack program[1] in bash that I occasionally play; it's ugly code, but it's pretty straightforward. More directly, I wrote (perl) a blackjack tester[2] to quiz myself, as well as a simple output of basic strategy[3]. I haven't touched these in half a decade, but seem to work fine! 1: https://github.com/Amorymeltzer/dotfiles/blob/master/bin/blackjack https://github.com/Amorymeltzer/dotfiles/blob/master/bin/bla... 2: https://github.com/Amorymeltzer/sandbox/blob/master/blackjackTester.pl https://github.com/Amorymeltzer/sandbox/blob/master/blackjac... 3: https://github.com/Amorymeltzer/sandbox/blob/master/basic_strategy.pl https://github.com/Amorymeltzer/sandbox/blob/master/basic_st... but I recommend running it as perl basic_strategy.pl | awk '{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11;}'` for nicer output
- justinsaccount 7y agoperl basic_strategy.pl | column -t
- Amorymeltzer 7y agoIndeed, but the broader spacing from awk is easier on the eyes