Skip to content

rforte/blackjack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blackjack

start game:


curl rforte-blackjack.herokuapp.com/api/v1/new_game
// sample response:
{"gid":"1234","dealer":["Qh","*"],"player":["Jh","5d"],"winner":"none","reason":"still_playing"}

status of game:


curl rforte-blackjack.herokuapp.com/api/v1/status/:gid
// gid is the game id from when a game was started
curl rforte-blackjack.herokuapp.com/api/v1/status/1234
{"gid":"1234","dealer":["Qh","*"],"player":["Jh","5d"],"winner":"none","reason":"still_playing"}

play game:


curl -d cmd=[hit|stand] rforte-blackjack.herokuapp.com/api/v1/game/:gid
curl -d cmd=hit rforte-blackjack.herokuapp.com/api/v1/game/1234
// or
curl -d '{"cmd":"hit"}' rforte-blackjack.herokuapp.com/api/v1/game/1234
{"gid":"1234","dealer":["Qh","6c"],"player":["Jh","5d","7s"],"winner":"dealer","reason":"player_busted"}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published