Hacker News new | ask | show | jobs
by kimar 2441 days 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.
1 comments

I'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/bla...

2: https://github.com/Amorymeltzer/sandbox/blob/master/blackjac...

3: 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

  perl basic_strategy.pl | column -t
Indeed, but the broader spacing from awk is easier on the eyes