use R-pentomino as default pattern

main
Elijah Voigt 2 days ago
parent 4f84c4cc86
commit 7aa159e7b8

@ -4,7 +4,8 @@
// * UI widget explaining rules/hotkeys // * UI widget explaining rules/hotkeys
// * Show shadow of piece (same tile, just with alpha transparency) // * Show shadow of piece (same tile, just with alpha transparency)
// * Start with an interesting pattern // * 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 // * Add "follow action" that adjusts camera to zoom in/out/move to see everything
// * Make click and drag feel better // * Make click and drag feel better
// * Add arrow keys to move around // * Add arrow keys to move around
@ -1089,10 +1090,15 @@ fn load_meshes(mut cell_assets: ResMut<CellAssets>, mut meshes: ResMut<Assets<Me
} }
fn default_board(mut writer: MessageWriter<Lifecycle>) { fn default_board(mut writer: MessageWriter<Lifecycle>) {
(-5..=5).for_each(|x| { // https://playgameoflife.com/lexicon/R-pentomino
(-5..=5).for_each(|y| { [
writer.write(Lifecycle::Alive(Coordinates { x, y })); (0,0),
}); (0,-1),
(-1,0),
(0,1),
(1,1),
].into_iter().for_each(|(x, y)| {
writer.write(Lifecycle::Alive(Coordinates { x, y }));
}); });
} }

Loading…
Cancel
Save