Skip to content

An educational game to learn Cairo where you implement ship AIs that fight to catch as much dust as possible!

License

Notifications You must be signed in to change notification settings

onlydustxyz/starkonquest

Repository files navigation

StarKonquest

pull requests welcome badge follow on Twitter License License

StarKonquest Contracts written in Cairo for StarkNet.

StarKonquest is an educational game to learn Cairo, in which you implement ship AIs that fight each others in a finite 2D grid to catch as much dust as possible.

The entire game runs in a single transaction, meaning the ships cannot be controlled manually. Players must implement an effective ship AI that will detect and catch dust as quickly as possible.

Dust move in random directions and bounce on the borders of the grid. There can be at most one ship on a cell of the grid, so ships can block each others.

Tournament logic is also implemented, allowing dozens of players to fight in multiple battles until only one winner remains.

Usage

⚠️ WARNING! ⚠️

This repo contains highly experimental code. Expect rapid iteration. Use at your own risk.

Set up the project

Requirements

📦 Install

protostar install

⛏️ Compile

protostar build

Goal

Implement your ship to catch as much dust as possible.

Here are some working example of different ship implementations.

Get started

See instructions to deploy and run a tournament locally.

Testing

protostar test

Coding your ship logic can be tricky, we suggest you use tests to check your code.

You can get inspiration from the basic ship tests and run this specific test with export match=basic_ship && make test.

Contributing

Please read CONTRIBUTING.md.

📄 License

starkonquest is released under the Apache-2.0.

About

An educational game to learn Cairo where you implement ship AIs that fight to catch as much dust as possible!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published