Inspiration

For this hackathon, we wanted to have fun and create an original and entertaining game for kids and adults alike. We’ve always found that games weren’t made for all age groups. So, when spending time with family and friends, it would be hard to bond over a game since it would either be too easy or too hard. Thus, we wanted to create a game suitable for everyone! This meant a game that would have easy to learn controls but also be challenging and exciting. After brainstorming for quite some time, we decided to create a twist to the game Tic Tac Toe, and this led us to create the game Number Tic Tac Toe.

What it does

Number Tic Tac Toe is similar to regular Tic Tac Toe, however, players must take turns uncovering the squares with numbers from 1-9 assigned to them by clicking on the squares. If a player gets 3 numbers in a row, column, or diagonal (like Tic Tac Toe) that add up to 15 first, they win! This provides an element of mystery to the game that intrigues the players to want to figure out a strategy.

How we built it

We used the online IDE called replit.com to code Number Tic Tac Toe in Python. We used the Tkinter library to create the GUI of Number Tic Tac Toe. There are 9 buttons arranged in a grid format for the players to click and each button has a randomly chosen number from 1-9 appointed to it. As the players click on the buttons, information such as the button value, the player number and the button’s position in the grid is stored. As players keep clicking, this information updates and is constantly checked to determine whether or not there is a winner. The end result is displayed in a new window for the players. Along with building the logic and code, we also wanted to incorporate a pleasant user experience, so we added pretty colours to our minimalistic grid design. The colours we used are easy on the eyes and add to the fun mood of Number Tic Tac Toe.

Challenges we ran into

We faced many challenges trying to code this masterpiece. Firstly, we had to figure out how to assign a number to the buttons and make them show on click. So we had to create multiple functions to achieve that. We also had to figure out if the player’s buttons added up to 15 and were also in a straight line. Which meant we have to make an array that would update in real-time as the user would carry out their actions in the game. There was also a bit of trouble getting the player’s turn messages correct, as it did not display the correct player’s turn. Lastly, we had to get the winner/tie message to display the correct information. We took a lot of time and thinking to solve these main problems to complete our project.

Accomplishments that we're proud of

This is our first-ever hackathon with a project created solely with code, so this was a massive accomplishment on its own. We’re also proud of being able to debug and solve the numerous problems that we ran into by creating separate files to test on and trying multiple techniques. Our team communicated and worked together to create an amazing and fun experience for all of us. Finally, we managed our time well and were able to complete the project on time without panic.

What we learned

Since our team mainly created projects with the prototyping software, Figma, we wanted to try something new this time to improve on our skills. So this time, we chose to make a game entirely based on code. Through the process, we learnt more about the logic behind a game, how to code logic in a game, perseverance and patience when met with numerous problems, and how to cooperate with our team members so that each and every one of our ideas could be implemented within the game. We also learned how to divide up the work so that everyone had a chance to show off their respective talents.

What's next for Number Tic Tac Toe

We’d like to add a function that would prevent the users from clicking on the same box twice. Also, it would be nice if our program could keep track of the player’s score as well in order to create a more competitive gaming environment. A restart button that provided more levels would also be good to add. Furthermore, we’d like to create different variations of Number Tic Tac Toe as well so the players could have more options.

Built With

Share this project:

Updates