Oh Craps! – My Love of Dice

I absolutely love the game of Craps. The play built entirely around chance, each roll an independent event that doesn’t affect future outcomes and is not built on by previous rolls. Whenever I’m at a casino, I always seek out the tables by the sound of the chips being stacked and fiddled with, the call of the stickmen, the roll of the dice, and the collective cheers or groans coming from all of the players.

If you’ve never played it before, or have been intimidated by the noise and madness coming from each table, I highly recommend you try it out! Bring me along and I’ll teach you how to play! 🙂

Everyone at the table gets a turn at being the shooter, or the person rolling the dice. Your first roll is called the Coming Out roll. You have to make a bet on the Pass Line in order to shoot the dice. If you roll a 7 or 11 on this roll, you win! If you roll a 2, 3, or 12, those are Craps numbers and you lose but get to roll again once you make another Pass Line bet. If you roll any other number (4, 5, 6, 8, 9, 10), that number becomes the Point. When you have established a Point, you try to roll to get that number again in order to win. At this point, if you roll a 7, you lose, the game resets, and the dice are offered to the next player at the table. If you roll the Point, you win and get to make another Coming Out roll as play restarts! That’s Craps in a nutshell, and of course there are tons of things you can bet on or do between rolls of the dice.

It’s a guilty pleasure, but one that I could only satisfy whenever in Nevada. California casinos have a variant of Craps, but it’s a stupid one where stacks of red and blue cards are sitting in front of the stickman, the dice you throw are two different colors, and whichever dice comes up higher than the other determines the color of card that is drawn. Each of the cards has a dice outcome printed on it, and it’s just not fundamentally the same as shuffled cards aren’t as fun as thrown dice and it all comes down to how the decks have been shuffled.

Wanting to scratch the proverbial itch that came with wanting to throw some bones, I started seeking out accessible Craps games that were available to blind players. I wanted one that was accurate, allowed for complex betting systems, and was streamlined and easy to play so the interface never got in the way of the fun. All I really found was Ears Craps, formerly known as Blindfold Craps on iOS.

It worked to a degree, but was slow to play, hard to make different bets of different amounts in a quick way, plus many core functions of the game were incorrect and inaccurate. The Come bets didn’t function correctly, Place bets would come down after a win, forcing you to place the bets again every time they hit, and a variety of different errors. I sent in a bunch of feedback to the developer, and their response basically made it seem like I was the only one to have ever played the game, which was rather sad.

Disappointed with this, I set out to code my own Craps game. If you can’t find it, make it yourself! I was learning Python at the time and was getting the hang of writing little programs here and there, plus had just finished up a Blackjack game called Hit the Deck, but was determined to build a full and robust Craps game that I and others could play through Terminal. I had to wrap my head around assigning tons of different variables and controlling user flow through the app since so many kinds of different bets could be made with each throw of the dice. A lot of bets have different actions, some are only around for one roll, others persist or move about the table depending on what the dice outcome is. Building the bank system and the dice rolling functions were easy, but then I set about adding everything in piece by piece.

Pass Line bets were the first to be added, followed by the Field and Proposition Bets. As I developed more for phase 2 of the betting system when a point was established in the game, I paid attention to how the player would be guided through the different bets available to them. I decided to keep it fairly simple and made a linear progression, having the user confirm or pass by the various types of bets each time before rolling the dice.

I wrote, scrapped, re-wrote, tested, scrapped again, and kept making the game more efficient and robust with each iteration. I’d have a sudden epiphany of how a function would work, and started learning the Github process to make branches to test out my ideas, tweak the code, then merge my changes back into my Master branch when I felt satisfied with the outcome.

My game pays out accurately and I had a fun little time writing the ReadMe for the app and building a pay table out of Markdown. All the bets function appropriately as you would find them at a table on the Strip. You have Line Bets, Field Bets, Prop Bets, Lay and Place Bets, Come Bets, Odds, and automatic Buy Bets when the Place 4 and 10 get to a certain level. I built in the ability to have your bets working on the come out roll and added fun little bits of flavor text based on the dice outcomes.

Ultimately, I started following ColorUp on YouTube to get acquainted with many different kinds of Craps strategies and I really enjoyed listening to him roll them out on his table, assessing their worth and demonstrating how they worked. As I came across strategies that required different kinds of bets to be available, I would figure out ways to build those into my game and update everything.

It’s been a really fun ongoing project, and my next updates will include the ability to bet on the All Tall Small bet and am still figuring out a good way to program in Hop bets. Apart from those, everything else you can do on the table is there!

I set to work building a webpage that would hold all of the strategies I would come across on YouTube or from other sources, and built it to be fully accessible to screen reader users so I could easily and quickly jump between the strategies. Rather than having a massive page full of text, I created a select menu in HTML 5 that would show the selected strategy. I added aria-live to the container that received the loaded strategy so that a screen reader user would hear the strategy get announced without ever having to move their focus from the selector. The list has grown quite large, and it’s been great having a fun game to play at my own pace that I can adjust as needed without having to wait for another developer to futz with their own code, plus it helps the wallet so I can test out strategies without losing any real money!

If you are a fellow Craps player and don’t mind playing it similar to a text based game, check out Oh Craps! on my github:
Oh Craps! Github Page

And then pop open my page full of strategies and give them a whirl:
Oh Craps Strategies

Follow the instructions in the ReadMe, place your bets, and Keep on rolling!


Posted

in

by