pink sand!

This commit is contained in:
Crispy 2024-04-29 22:54:52 +02:00
parent 4e850668cd
commit a808e7996b
4 changed files with 14 additions and 6 deletions

7
Cargo.lock generated
View file

@ -2617,6 +2617,12 @@ dependencies = [
"ttf-parser",
]
[[package]]
name = "owo-colors"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f"
[[package]]
name = "parking"
version = "2.2.0"
@ -3340,6 +3346,7 @@ name = "uscope"
version = "0.1.0"
dependencies = [
"bevy",
"owo-colors",
"petri",
]

View file

@ -81,7 +81,7 @@ impl Dish {
height: 2,
contents: vec![
Some(Cell::WHITE),
Some(Cell::EMPTY),
None,
Some(Cell::WHITE),
Some(Cell::EMPTY),
],
@ -91,7 +91,7 @@ impl Dish {
height: 2,
contents: vec![
Some(Cell::EMPTY),
Some(Cell::EMPTY),
None,
Some(Cell::WHITE),
Some(Cell::WHITE),
],
@ -102,7 +102,7 @@ impl Dish {
width: 2,
height: 2,
contents: vec![
Some(Cell::EMPTY),
None,
Some(Cell::WHITE),
Some(Cell::EMPTY),
Some(Cell::WHITE),
@ -112,7 +112,7 @@ impl Dish {
width: 2,
height: 2,
contents: vec![
Some(Cell::EMPTY),
None,
Some(Cell::EMPTY),
Some(Cell::WHITE),
Some(Cell::WHITE),
@ -195,7 +195,6 @@ impl RulePattern {
if x >= self.width || y >= self.height {
None
} else {
// dbg!(x, y);
self.contents[x + self.width * y].clone()
}
}

View file

@ -8,3 +8,4 @@ edition = "2021"
[dependencies]
petri = { path = "../petri" }
bevy = { version = "0.13", features = ["dynamic_linking"] }
owo-colors = "4.0.0"

View file

@ -1,3 +1,4 @@
use owo_colors::OwoColorize;
use petri::{Cell, Dish, CHUNK_SIZE};
fn main() {
@ -30,7 +31,7 @@ fn render_pixel_pair(dish: &Dish, x: usize, y: usize) {
(true, false) => "",
(true, true) => "",
};
print!("{}", char);
print!("{}", char.fg_rgb::<255, 147, 219>());
}
pub fn wait_for_input() {