From 7aa159e7b822e0d0a2b3b8761d1cb971b5d75cec Mon Sep 17 00:00:00 2001 From: Elijah Voigt Date: Mon, 20 Jul 2026 15:58:09 -0700 Subject: [PATCH] use R-pentomino as default pattern --- life/src/main.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/life/src/main.rs b/life/src/main.rs index 7c92ab1..9455b01 100644 --- a/life/src/main.rs +++ b/life/src/main.rs @@ -4,7 +4,8 @@ // * UI widget explaining rules/hotkeys // * Show shadow of piece (same tile, just with alpha transparency) // * Start with an interesting pattern -// * UI minimize widgets +// * UI minimize widgets (mostly done) +// * Indicate to click on the UI // * Add "follow action" that adjusts camera to zoom in/out/move to see everything // * Make click and drag feel better // * Add arrow keys to move around @@ -1089,10 +1090,15 @@ fn load_meshes(mut cell_assets: ResMut, mut meshes: ResMut) { - (-5..=5).for_each(|x| { - (-5..=5).for_each(|y| { - writer.write(Lifecycle::Alive(Coordinates { x, y })); - }); + // https://playgameoflife.com/lexicon/R-pentomino + [ + (0,0), + (0,-1), + (-1,0), + (0,1), + (1,1), + ].into_iter().for_each(|(x, y)| { + writer.write(Lifecycle::Alive(Coordinates { x, y })); }); }