joshprzybyszewski / cribbage

A cribbage scorer and game
MIT License
2 stars 1 forks source link

cribbage

This repo started as a challenge from a friend to calculate the distribution of all hands' points for every possible cribbage hand faster than his MATLAB implementation. Spoilers: golang is faster than MATLAB. Now it has become a playground to mess with unfamiliar technologies (like mongodb, web assembly, React, hopefully aws lambdas, and more), to show off what I have learned (like golang, MySQL+RDS, designing for scale), and to build up some technical ability between friends.

Cribbage has a ton of seemingly made up rules, and this project is my attempt to turn those into an interactive game for humans.

codecov

How to install

  1. Go get this project
go get -u github.com/joshprzybyszewski/cribbage
  1. Install everything you need
make install
  1. In one terminal, start the server
make serve
  1. Start playing cribbage.
make goclient

Happy Playing!

Legacy Binary

If you'd like to play the first version of our game, you can run the legacy player, which allows you to play dumb and calculated NPCs:

go run main.go -legacy

Future Vision

On our TODO list:

We will be using AWS free tier as hobbyists to get this deployed out into the cloud. Currently, we have persistent MySQL database in RDS. We're working on getting our app deployed so that you can play from anywhere. Someday, we'd like to have user auth provided by Oauth2 for legit sign-in, push notifications sent out using SNS, AWS Lambdas executing a game's actions, and potentially even settuing up a NoSQL MongoDB database in AWS just for fun.