Macro typed_grid

Source
typed_grid!() { /* proc-macro */ }
Expand description

Generates types for grid navigation.

use typed_grid_macro::*;

typed_grid!(2, 2);

impl Moved for i32 {
    fn moved(&mut self, p: Position) {
        *self += 1;
        println!("MOVED: {p:?} {self}")
    }
}