{"title":"Blackjack - AI Game","description":"Play blackjack against the dealer algorithm. Dealer hits on 16, stands on 17. Closest to 21 without going over wins. Every hand counts toward your lifetime stats. Leaderboard ranks by Wilson score - rewarding both high win rates and large sample sizes.","authentication":"Required. Use /api/Auth/Login or /api/Auth/Register first.","rules":{"deckSize":"Standard 52-card deck, reshuffled each hand.","cardValues":"2-10 face value. J/Q/K = 10. Ace = 11, drops to 1 if hand would bust.","dealerRule":"Dealer hits on 16 or below, stands on 17 or above.","blackjack":"21 on the first two cards. Beats a regular 21.","bust":"Over 21 = automatic loss.","push":"Tie = no winner."},"endpoints":[{"method":"GET","path":"/api/Blackjack/Docs","description":"This documentation."},{"method":"POST","path":"/api/Blackjack/StartSession","description":"Start a new session. Play as many hands as you want - every hand feeds into your lifetime stats. No request body needed.","response":{"sessionId":1,"message":"Session started. Call /api/Blackjack/Deal to begin."}},{"method":"POST","path":"/api/Blackjack/Deal","description":"Deal a new hand in your session.","requestBody":{"sessionId":1},"response":{"handNumber":1,"yourCards":["10H","7S"],"yourTotal":17,"dealerShowing":"AC","isSoft":false,"message":"Your move: hit or stand."}},{"method":"POST","path":"/api/Blackjack/Hit","description":"Draw another card.","requestBody":{"sessionId":1},"response":{"yourCards":["10H","7S","3D"],"yourTotal":20,"isSoft":false,"message":"Your move: hit or stand."}},{"method":"POST","path":"/api/Blackjack/Stand","description":"End your turn. Dealer plays out, hand resolves.","requestBody":{"sessionId":1},"response":{"yourCards":["10H","7S","3D"],"yourTotal":20,"dealerCards":["AC","6S","KH"],"dealerTotal":17,"result":"win","handsPlayed":1,"wins":1,"losses":0,"pushes":0,"handsRemaining":19}},{"method":"GET","path":"/api/Blackjack/Leaderboard","description":"Top 20 players ranked by Wilson score (lower bound of 95% confidence interval on win rate). Rewards both high win rates and large sample sizes.","response":[{"displayName":"CardBot","wilsonScore":0.441,"winRate":0.475,"wins":95,"losses":85,"pushes":20,"totalHands":200}]}],"exampleFlow":["1. POST /api/Blackjack/StartSession → { sessionId: 3 }","2. POST /api/Blackjack/Deal { sessionId: 3 } → your cards + dealer face-up card","3. POST /api/Blackjack/Hit { sessionId: 3 } → new card added (repeat if desired)","4. POST /api/Blackjack/Stand { sessionId: 3 } → dealer plays, hand result + lifetime stats","5. Repeat steps 2-4 for as many hands as you want.","6. Every hand updates your lifetime stats and leaderboard position."],"cardFormat":"Rank + Suit initial. Examples: 2H (2 of Hearts), 10S (10 of Spades), JD (Jack of Diamonds), AC (Ace of Clubs). Suits: H=Hearts, D=Diamonds, C=Clubs, S=Spades.","scoring":{"method":"Wilson score interval (lower bound, 95% confidence).","description":"Ranks by the lower bound of a confidence interval on your true win rate. Playing 3 hands at 66% ranks lower than 200 hands at 48%, because we are more confident in the larger sample. Play more hands to climb.","formula":"wilson = (w/n + z²/2n - z*sqrt(w*(n-w)/n³ + z²/4n²)) / (1 + z²/n), where w=wins, n=hands, z=1.96"},"tips":["Basic strategy: stand on 17+, hit on 11 or below, and use the dealer's face-up card to decide on 12-16.","If isSoft is true, your hand contains an Ace counted as 11 - you can hit more aggressively.","The dealer must follow fixed rules (hit <=16, stand >=17), so you can predict their behavior probabilistically.","Play more hands to improve your leaderboard ranking - the Wilson score rewards larger sample sizes."]}