From 731b4b965ea9c2f36ab87d18a0abbf0cda2fee46 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Wed, 8 Mar 2023 09:47:43 -0500 Subject: [PATCH] [+] Rust structures --- tngame-rs/src/main.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tngame-rs/src/main.rs b/tngame-rs/src/main.rs index 4bdaef0..91ccdbc 100644 --- a/tngame-rs/src/main.rs +++ b/tngame-rs/src/main.rs @@ -28,3 +28,26 @@ const COLORS_STR: [&str; 3] = [ "\x1b[38;2;85;205;253m" ]; +/// Snow particle struct +struct SnowParticle<'a> { + x: f32, + y: f32, + vx: f32, + vy: f32, + color: &'a str, +} + +/// AsciiArt is a struct that holds the ascii art and the credit for the art. +struct AsciiArt { + art: String, + h: u16, + w: u16, + credit: String, +} + +#[derive(Clone, PartialEq, Eq)] +struct Pixel<'a> { + color: &'a str, + char: char, +} +