Building a simple Tic-Tac-Toe game May 02

Yesterday, I found myself needing to pass some quality time with my daughter and we decided to play tic-tac-toe. To my surprise, there weren’t many options for a simple tic-tac-toe game that allowed two people to play remotely by just sharing a link. Sure you have lots of options if you download a game or want to go to a website and press through 438 ads before playing, but I was looking for a straightforward page where you could click “new game,” and then easily invite someone to join by sharing a link.

Seeing this gap, and also wanting to dive back into programming with Ruby on Rails—a framework I hadn’t touched in over a decade—I decided to take it upon myself to create just what I needed. I called this new project Tic-Tac-🦶🏼, where players can choose fun emojis instead of the traditional X and O symbols.

This project was not just about creating a game; it was an exploration into modern web technologies, specifically real-time communication. I used this opportunity to experiment with Action Cable, Rails’ integrated feature for WebSockets. It was fascinating to see how seamlessly it facilitated real-time updates, a crucial component for a responsive and engaging two-player game.

Through building Tic-Tac-🦶🏼, I reacquainted myself with Rails’ robust framework and refreshingly ‘convention over configuration’ philosophy. What started as a simple project to kill time and reconnect with my daughter became an enriching journey into software development. Not only did we create a fun way to play together, but I also implemented a player versus player statistics feature, allowing us to track how many games each of us has won.

This feature has added a competitive edge to our games and has made our sessions more exciting. I’m now contemplating adding more features like multiple game rooms. Who knew that a simple game of tic-tac-toe could reignite my passion for coding and offer such a fun and interactive way to bond with my daughter? I’m excited about the new directions this little project might take in the world of web development.