diff --git a/src/baggy.rs b/src/bag.rs similarity index 100% rename from src/baggy.rs rename to src/bag.rs diff --git a/src/board.rs b/src/board.rs index 637a4d8..ec1a16c 100644 --- a/src/board.rs +++ b/src/board.rs @@ -1,6 +1,6 @@ use thiserror::Error; -use crate::{baggy::Tile, dictionary::Dictionary}; +use crate::{bag::Tile, dictionary::Dictionary}; #[derive(Error, Debug)] pub enum MoveError { diff --git a/src/dictionary.rs b/src/dictionary.rs index 469c67e..6e5bbc1 100644 --- a/src/dictionary.rs +++ b/src/dictionary.rs @@ -1,6 +1,6 @@ use std::fmt::Display; -use crate::baggy::Tile; +use crate::bag::Tile; #[derive(Clone, Debug, PartialEq)] pub struct Word { diff --git a/src/lib.rs b/src/lib.rs index 87a4841..eafc445 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,7 @@ use player::PlayerId; use thiserror::Error; -mod baggy; +mod bag; mod board; mod data; mod dictionary; @@ -10,20 +10,20 @@ mod player; #[derive(Debug, Error)] pub enum GameError { #[error("Not enough tiles in bag")] - NotEnoughTiles(#[from] baggy::BagError), + NotEnoughTiles(#[from] bag::BagError), } #[derive(Debug)] pub struct Game { board: board::Board, - bag: baggy::Bag, + bag: bag::Bag, players: Vec, } impl Game { pub fn new() -> Game { let bag_data = data::BagData::load_from_json(include_str!("../bag.json")).unwrap(); - let bag = baggy::Bag::from(bag_data); + let bag = bag::Bag::from(bag_data); let dictionary = dictionary::Dictionary::new(); Game { board: board::Board::new(dictionary), @@ -36,7 +36,7 @@ impl Game { &self.players } - pub fn bag(&self) -> &baggy::Bag { + pub fn bag(&self) -> &bag::Bag { &self.bag } diff --git a/src/player.rs b/src/player.rs index e92bf4d..4a75c39 100644 --- a/src/player.rs +++ b/src/player.rs @@ -1,4 +1,4 @@ -use crate::baggy::Bag; +use crate::bag::Bag; #[derive(Clone, Copy, Debug, PartialEq)] pub struct PlayerId(pub u32);