summaryrefslogtreecommitdiff
path: root/src/types.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/types.rs')
-rw-r--r--src/types.rs16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/types.rs b/src/types.rs
index df9e168..1c9ae89 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -23,20 +23,6 @@ pub struct Config {
pub socket_addr: SocketAddr,
}
-#[derive(Debug, Clone, Copy)]
-pub struct BoardConf {
- pub w: usize,
- pub h: usize,
- /// tiles to mines, expressed as (numerator, denominator)
- pub mine_ratio: (usize,usize),
-}
-
-impl Display for BoardConf {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(f, "{}x{} {}/{}", self.w, self.h, self.mine_ratio.0, self.mine_ratio.1)
- }
-}
-
#[derive(Debug)]
pub struct Room {
pub name: String,
@@ -45,7 +31,7 @@ pub struct Room {
pub public: bool,
pub driver: tokio::task::JoinHandle<()>,
pub cmd_stream: CmdTx,
- pub board_conf: BoardConf,
+ pub board_conf: minesweeper::BoardConf,
}
#[derive(Debug)]