Mexican Train Dominos!

Welcome to my domino game! Enter a list of comma separated usernames below then click the "Create Game" button. A new domino game will be started for you. Example input: "Parker,Adam,George"

Let's play some dominos!

Max double:
Starting hand size:
Comma separated usernames:


How do I play Mexican Train Dominos?

There are many different variations on the rules. These are the rules that this game uses.

How do I chat with other players?

It is recommended to start a video conference separately.

How do I score and reset the game each round?

Only an admin can perform these actions. Append "&admin" to the end of the play.html URL, and reload the page. You are now an admin, and the page should contain more buttons. As an admin, you have the following powers:

What happens if I encounter a bug?

First try to reload the webpage. All the important gamestate should already be saved and it should come back on a reload. If that doesn't work, maybe one of the admin features could be used to remedy the issue. If that doesn't work, maybe just score the current state of the round, and start a brand new game. Please email any bug reports to robertmparker [at]

I looked at the source code, why is it so crappy?

Don't judge me. I'm not a frontend developer, so I don't know what the proper coding conventions are for javascript. I took the laziest approach to developing this. There is no server-side logic. The client just reads/writes the gamestate using Firebase Firestore API. And the client reads the state out, and does it's thing. So there is absolutely no security, but it's cheap, fast, and easy.

Can I cheat?

Absolutely, the entire gamestate is sent to all users. So if you break out a debugger, then you can look at other users' hands and the boneyard. But don't do that. Everyone is on the honor system.

Can I play this offline?

No, state is saved to the cloud after any significant action.

Can I play this by myself?

Not really. I wrote this specifically to play against friends. Other apps(which don't support multiplayer!) exist that support playing against an AI. You should try one of those.

Why isn't more of this game automated?

I wanted to give the user the ability to make mistakes. Because I think that is an essential part of the gameplay. For instance a user can forget to put their train up, or they can pass on their turn when they could have played a domino. I wanted users to actually play, and not just click buttons on auto-pilot.

Will this game work in my web browser?

Probably, but I have only tested it in the current version of Google Chrome. It is just plain JavaScript plus the Konva API for doing writes to an HTML5 Canvas. I would assume Konva has good cross-platform support, since thats kinda the point of using these libraries.

Does it detect when a round is over?

No, you should call out to your friends that you won. Then the admin can score the round, and reset the game. Remember to call out when you have one domino left!

I broke a rule, and got called out for it. How do I draw an extra domino?

The game prevents you from drawing more than one domino per play. If you need to draw an extra, the admin can use the "pass" button to skip around to you again, then you can draw an extra domino. Then if needed the admin to use the "pass" button to advance to the correct next player

Does this work on mobile?

I have tested it on my android phone, and someone has played it on an ipad. So it should work. But it's not like I am doing much testing for platform compatibility. Or really any automated testing for that matter.

What does it look like?

Here is a screenshot. And here is a video of the animation when someone wins.

Where is the clipart from?

I bought the domino graphics online for $2, which is a fantastic deal. It would have taken me hours to create something that wouldn't have looked half as good. It was designed by Jen Hart Design. I have a license to use this art for personal/commercial use, but please don't just scrape it from this site.

Is it open source?

Not yet, but I'm working on that. I've never really written any open source code before, so I don't really have an existing reputation. And I would be horrified if people judged my professional abilities based on just this project.