DEV Community

Add00
Add00

Posted on

Hackoberfest: Part 4

Greetings,

For this final part I wanted to do something that was still interesting, but not a time consuming as making a custom pseudo ray-casting engine. So using the game engine I became very familiar with I saw their was an issue to implement tic-tac-toe a simple but popular game.

So I requested permission to work on the topic and started right away. First I setup some code to draw the game board to the screen then when a click event happens it will map the pixel coordinates click to the corresponding cell in a 3 by 3 array storing the previously placed pieces.

Then it will check to see if the "X" or "O" player has won if it hasn't it will cycle back to waiting for a click. Once a player has one or tied it will show a win message and end the game.

That concludes the Hackoberfest saga it was really quite the learning experience. I feel there was a lot of things, in particular time management better. Now that I've gone through this contributing to open source does not stress me out as much as it used to and I think I'm better at managing time.

The next post will be your regular scheduled programming about the AI CLI tool and Static Analysis.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay