Create a design complexity document
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/manual/woodpecker Pipeline was successful

This commit is contained in:
Isaac Mills 2024-03-10 21:34:38 -04:00
parent d7a5c5275a
commit 7e21d9b274
Signed by: fnmain
GPG key ID: B67D7410F33A0F61
2 changed files with 46 additions and 0 deletions

45
src/design_complexity.rs Normal file
View file

@ -0,0 +1,45 @@
//! # Design/Program complexity
//!
//! - We use the [`heapless::Vec`] array type to store a fixed number of
//! [`ActionCard`]s for the player in the [`Player`]
//! type
//! - We use the [`heapless::Vec`] array type to store a fixed number of
//! [`Player`]s in the [`SituationTable`] type
//!
//! - We're going to use a separate program to design and create a file for the
//! [`ActionCard`]s and the [`SituationCard`]s, which will be loaded when the game
//! begins.
//!
//! - Our loops are going to be managed by [`bevy`]'s [`ecs`].
//!
//! - The [`ecs`] is going to be managing our objects as data records
//! - Every object marked with [`Resource`] or [`Component`] can be
//! a record stored by the engine
//!
//! - We're going to need to search for [`ActionCard`]s and [`SituationCard`]s in an
//! array that we load from a file in order to be able to use them.
//! - [`ActionCard`]s specifically will also have an associated [`CardType`] which will
//! need to be taken into account during the search
//!
//! - Selection statements such as `match` will be used all over our codebase to
//! select things based on associated data such as [`Position`]s
//!
//! - We're going to sort the [`ActionCard`]s in the [`Player`]s hand by it's influence
//! cost
//!
//! - User defined methods are everywhere in this codebase, most of which interact with
//! the [`ecs`]
//!
//! - User defined objects are also everywhere, and will be used to build the
//! [`Component`]s and [`Resource`]s the game will need to exist
#![allow(unused_imports)]
use crate::cards::ActionCard;
use crate::cards::CardType;
use crate::cards::SituationCard;
use crate::player::Player;
use crate::player::Position;
use crate::rooms::SituationTable;
use bevy::ecs;
use bevy::prelude::{Component, Resource};

View file

@ -8,6 +8,7 @@ use bevy_asset_loader::loading_state::{
use tracing_subscriber::EnvFilter; use tracing_subscriber::EnvFilter;
mod cards; mod cards;
mod design_complexity;
mod logo; mod logo;
mod menu; mod menu;
mod networking; mod networking;