A C# Windows Forms app to play Tic-Tac-Toe.
A small application to play tic-tac-toe against another player on the same device. Includes multiple colors and symbols to choose from.
Download from the exe branch and run the TiC#-TaC#-Toe.exe file.
On startup you can choose the names, symbols and colors of the two players playing.
๐ Checking the CPU checkbox turns that player into a computer opponent. When a CPU is enabled pressing the grey button that appeared will switch between 'Standard' and 'Impossible' modes. ๐
Press confirm to start playing tic tac toe.
The screen on the right shows the two players and their score. The top player always begins. Click on an empty square to fill it with your symbol. The other player is now next to place their symbol.
Pressing the restart button will clear the board. Pressing restart when the board is empty will ask you to completely reset the game.
Whenever a player gets three in a row they win. Their score will be updated and you will be shown how many you have won in a row.
Coming off of a few python projects I decided to start learning C#. After figuring out the basics I decided to design and program a basic tic-tac-toe application as my first C# project.
After planning and designing it I learned quickly how easy it was to create an interface compared to how I previously did them in Python (with PyGame and KiVy). I felt like making a good looking interface is what cost me the most time in Python, so dragging premade Controls and using the built-in Properties & Events using Windows Forms felt fantastic.
Using semicolons is something I remember from a few years ago, but Python made me forget how much of a pain they can be. Luckily I got used to them pretty quickly, starting if
statements with brackets however is still something I forget to do every time. ๐ต
In terms of how the code/math works I felt comfortable using what I already know from Python. Nothing really different in terms of approach there. It's all just a bunch of if
and foreach
loops anyway.
The hardest part of any programming project for me is before and after the programming. Luckily I keep improving in this aspect as well. I've sped up my ability to churn out a functional design and action plan by a whole entire day! This README I feel like is also an improvement compared to my previous projects' attempts.
One more thing I tried to use this time is GitHub's Releases function. I'm not entirely certain that I'm using it right. Might be a good idea for the next time to combine the exe version with the full project version. Talking about executables, Visual Studio's ability to create .exe incredibely easy is great. No longer trying to get PyInstaller to work properly. ๐
2.0 Computer Opponent Release
This project is licensed under the MIT License - see the LICENSE.md file for details