beeg comment
parent
5fc1a506e6
commit
282964a0f0
50
src/main.rs
50
src/main.rs
|
@ -3,6 +3,56 @@ use bevy::{
|
||||||
sprite::{MaterialMesh2dBundle, Mesh2dHandle},
|
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() {
|
fn main() {
|
||||||
App::new()
|
App::new()
|
||||||
.add_plugins(DefaultPlugins)
|
.add_plugins(DefaultPlugins)
|
||||||
|
|
Loading…
Reference in New Issue