Tic-Tac-Toe
A classic and simple game on Sails in which the user competes against a program operating on the blockchain network.
Description
Few classic gaming titles hold as much nostalgia and timeless appeal as Tic-Tac-Toe. Put your strategic prowess against an adversary unlike any other – a decentralized program operating on the Vara blockchain network. This simple yet engaging game example demonstrates the power of Sails Framework for writing programs on Vara: https://wiki.vara.network/docs/build/sails/.
How to Play
The rules of Tic-Tac-Toe remain unchanged—the objective is to be the first to get three of your marks in a horizontal, vertical, or diagonal row. However, the seamless integration with the Vara blockchain elevates the experience.
To begin, simply initiate a new game, and the program will randomly assign you as either X or O. Every decision counts as you strive to outmaneuver your blockchain-based opponent.
Technical Aspect
Tic-Tac-Toe on Vara showcases the innovative capabilities of the Gear Protocol and its decentralized infrastructure. Unlike traditional games that rely on centralized servers, this implementation operates entirely on-chain, leveraging the asynchronous messaging paradigm of the Vara network. The program example is written on Sails framework
Usually, a program's state advances as the application is utilized. A distinctive feature of this game's implementation is its capability to clean up its storage. Once the game session is completed and the results are recorded in the program, a special delayed message purges all unnecessary data structures. Delayed messages represent one of the various unique features of the Gear Protocol.
More details can be found at https://wiki.gear-tech.io/docs/examples/Gaming/tictactoe.
Gear Foundation
- Game