feat(engine): add layout, LayoutResource, and TablePlugin
compute_layout is a pure function that maps window size to card size and the 13 pile positions, with clamping at the 800x600 minimum and seven tableau columns horizontally aligned with stock/waste (cols 0,1) and the four foundations (cols 3,4,5,6). TablePlugin spawns a 2D camera, a felt background sprite, and 13 translucent pile-marker sprites, and repositions them on WindowResized. Plugin registers WindowResized explicitly so it works under MinimalPlugins in tests. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use bevy::prelude::*;
|
||||
use solitaire_engine::GamePlugin;
|
||||
use solitaire_engine::{GamePlugin, TablePlugin};
|
||||
|
||||
fn main() {
|
||||
App::new()
|
||||
@@ -14,5 +14,6 @@ fn main() {
|
||||
}),
|
||||
)
|
||||
.add_plugins(GamePlugin)
|
||||
.add_plugins(TablePlugin)
|
||||
.run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user