Skip to content
Tic-Tac-Toe VM

Tic-Tac-Toe VM

A Rust-based VM which allows for players to enjoy a game of tic-tac-toe fully-on chain.

Created on 16th April 2023

•

Tic-Tac-Toe VM

Tic-Tac-Toe VM

A Rust-based VM which allows for players to enjoy a game of tic-tac-toe fully-on chain.

The problem Tic-Tac-Toe VM solves

Perhaps one of the best selling points of Avalanche Subnets is the idea that a user can customize their own subnet to their liking by customizing the VM. For this hackathon, I decided to take this idea and run with it by implementing what many would consider a universal game: tic-tac-toe.

Using the template given by the already existing Timestamp Virtual Machine, I created a Rust-based VM which implements the Tic-Tac-Toe logic fully on chain: users are able to propose block (i.e. propose a game action) which the VM then handles by checking if the block is "valid" (i.e. the move is legal) and updating the game state as necessary.

Challenges I ran into

Perhaps the biggest challenge was the lack of (beginner-friendly) documenation for some of the underlying types that Avalanche-Types-Rust (e.g. the DB type). In addition, although the developer docs gave good insight into what each component does in the same project Timestamp, I found it difficult to differentiate at times components that were necessary vs those that weren't.

Tracks Applied (1)

Ava Labs

Tic-Tac-Toe VM utilizes the Rust VM SDK provides by Ava Labs, which allows for developers to create Rust-based VMs which...Read More

Technologies used

Discussion

Builders also viewed

See more projects on Devfolio