Inspiration
The best way to learn a language is through a project that incorporates many aspects of technology that would have to get wielded through the language you are learning. Though, it’s rare I ever start a a project out with the image in my head of how it actually ends up to be. For example, the telegram bot projects started for a simple purpose then were expanded to the point where they had a bunch of different functions.
The Different Modes
There are two primary “modes” you can play this game in.
- Offline - The other player is on the same device as you. Turns change every round on same device. You could theoretically play with your self if you have friends.
- Online - The other player may be on a different device, and you are connected via a server/client type connection over TCP. Ofcourse being server/client means that playing with people outside your network may require port forwarding on behalf of the “server” player.
- Online+ (not developed) - I have had thoughts of making a third mode that would utialize a peer-to-peer type of connection. This would add many features such as: no need to port forward as there is no “server” player, and best of all, automatic matchmaking meaning, so no need for knowing who the other person is or messing with ip details of your oponent.
Try it out
My Gentoo type folks will like this: you can compile the game from my Github repo . As for a already compiled binary, I have unfortanetly not uploaded my game to crates.io , though there is a compiled binary on the Github repo, but it’s not up to date.
The Development Process
Stage I - Tic Tac Toe
Stage II - Custom Serialization
Stage III - Tic Tac Toe over TCP
Stage IV - Terminal Manipulation
* Mouse and Vim like keybindings