From 282964a0f0dfa102bbfe506aa9fb37008b5d9ca3 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Tue, 20 Aug 2024 06:19:09 -0700 Subject: [PATCH] beeg comment --- src/main.rs | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/main.rs b/src/main.rs index 895c0e1..eb8ae40 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,56 @@ use bevy::{ sprite::{MaterialMesh2dBundle, Mesh2dHandle}, }; +// In a vacuum this is just 2, 2 dimenionsal arrays, but I think +// that sort of state pattern doesn't fit well in the ECS architecture +// +// What we'll likely end up doing is spawning entities with positions +// and working from there, this shouldn't be a big problem since the +// games scope is limited to 22 pieces in a standard configuration, +// but we will have to loop over all of the game pieces to do anything +// with the naive solution +// 2 players +// 10 walls each +// 1 pawn each +// +// Ideally I'd like to find a way to make queries based on colocality, or otherwise +// find a method for batching only nearby entities with some form of spatial partitioning scheme +// but this is extra credit (I'll just make more boids) +// +// 9x9 piece board +// player position should in theory just be a component on the player token entities +// 8x8 wall board +// each wall piece can be either north_south or east_west +// None, NS, EW +// this will be an enum component on the wall entities +// +// technical choices to be made: +// 2d? 3d? +// in 2d; with sprites? or entirely in the ui layer? +// +// algorithms to write: +// finding valid moves, including both wall and player moves +// walls: +// a player can't place more than 10 walls +// a player can't place a wall in the same wall board tile +// as another board +// * a player can't place a wall such that it completely +// prevents their opponent from reaching your home row +// players: +// players can move single spaces +// players can't jump walls +// a player can jump another player like chinese checkers; +// this includes an L shaped jump when the player is against a wall +// |c A player in position `A` +// |a b can jump over a player in position `b` to reach position `c` +// +// +// implementation details to figure out; (that aren't included above) +// we'll need a method for selecting what type of move you wish to make +// we'll need methods for selecting where to make moves on both subgrids (wall and player) +// we'll need to keep track of player turns (States) +// we'll need to keep track of each players remaining walls (Resources) + fn main() { App::new() .add_plugins(DefaultPlugins)