wasmdome-mech-sdk

Crates.iowasmdome-mech-sdk
lib.rswasmdome-mech-sdk
version0.0.7
sourcesrc
created_at2020-02-26 14:56:35.283568
updated_at2020-07-29 16:22:25.306015
descriptionSDK for developing WebAssembly robots to compete autonomously in arenas
homepagehttps://wasmdome.dev
repository
max_upload_size
id212711
size16,324
Kevin Hoffman (autodidaddict)

documentation

https://docs.rs/wasmdome-mech-sdk

README

Assembly Mechs: Beyond WasmDome - Mech SDK

This is the SDK used by developers for building mechs to compete in the WasmDome. Developers building mechs that will compete for nothing less than the survival of the planet will do so by responding to turn events delivered by the game engine and return a vector of mech commands..

Here's an example of a mech that simply moves north and fires every turn (obviously you will want a more clever strategy if you want to win):

extern crate wasmdome_mech_sdk as mech;

use mech::*;

mech_handler!(handler);

pub fn handler(mech: impl MechInstruments) -> Vec<MechCommand> {
     vec![
          mech.request_radar(),
          mech.move_mech(GridDirection::North),
          mech.fire_primary(GridDirection::South)
     ]
}
Commit count: 0

cargo fmt