add c api

This commit is contained in:
Vinzenz Schroeter 2024-05-12 17:15:30 +02:00
parent 01d1f1dad0
commit 98e8a6d639
14 changed files with 832 additions and 23 deletions

View file

@ -4,8 +4,7 @@ use std::time::Duration;
use clap::Parser;
use rand::{distributions, Rng};
use servicepoint2::{Connection, Origin, PixelGrid};
use servicepoint2::Command::BitmapLinearWin;
use servicepoint2::{Command, Connection, Origin, PixelGrid};
#[derive(Parser, Debug)]
struct Cli {
@ -24,7 +23,7 @@ fn main() {
loop {
connection
.send(BitmapLinearWin(Origin::top_left(), field.clone()))
.send(Command::BitmapLinearWin(Origin::top_left(), field.clone()))
.expect("could not send");
thread::sleep(Duration::from_millis(14));
field = iteration(field);