Inspiration

The inspiration dates back to when I was a kid growing up in Puerto Rico - we played dominoes almost every day and were always on the lookout for tricks and techniques to gain an edge. To this day, we play dominoes at family gatherings and when we have friends over.

What it does

Lets the player team up with the computer to take on two computer-controlled players in a game of Caribbean Dominoes. The player can select any valid domino to play and then pick which end of the board to place it on.

How I built it

This implementation is built on HTML/CSS/Javascript hosted on S3. I set up a CloudFront distribution in front of the S3 for security and speed, since CF handles caching of the assets. I also added an API Gateway with two endpoints: one for getting the historical game records and the other for saving the scores and winners when a game is completed. The API Gateway integrates a Python Lambda function and all the data is saved in a DynamoDB table.

Challenges I ran into

The biggest challenge was getting the CORS working for the calls from Javascript, but I found a solution with a second Lambda function acting as a proxy for OPTION methods.

Accomplishments that I'm proud of

That a version of the game we loved growing up can now be played online.

What I learned

That AWS infrastructure is flexible enough to run a simple Javascript game which connects to very complex API Gateway, Lambda and DynamoDB components.

What's next for Capicu

Adding smarter computer opponents (and partner) is the next step - tweaks like attempting to get rid of doubles as soon as possible and keeping the double-zero until the last possible move (for bonus points) are some of the things I would love to incorporate into the game.

Built With

Share this project:

Updates