diff options
Diffstat (limited to 'src/game.rs')
-rw-r--r-- | src/game.rs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/game.rs b/src/game.rs new file mode 100644 index 0000000..492eaf3 --- /dev/null +++ b/src/game.rs @@ -0,0 +1,46 @@ +use crate::geometry::*; + +struct GameBoard { + player: Player, + opponent: Player, + powerups: Vec<Powerup>, + map: Map, +} + +struct Player { + active_worm: usize, + worms: Vec<Worm> +} + +struct Worm { + id: i32, + health: i32, + position: Point2d<u8>, + digging_range: u32, + movement_range: u32, + // This is unnecessary for now, but necessary later. I know + // for sure for the first round that all the worms will do the + // same damage and there isn't any way to change it. + weapon: Option<Weapon>, +} + +struct Weapon { + damage: u32, + range: u32, +} + +enum Powerup { + Health(Point2d<u8>, i32) +} + +struct Map { + size: u8, + /// This is 2d, each row is size long + cells: Vec<CellType> +} + +enum CellType { + Air, + Dirt, + DeepSpace, +} |