From 2826d78bbfab50eab90e5a1611576f33e752b7d8 Mon Sep 17 00:00:00 2001 From: stale Date: Sun, 29 May 2022 03:14:44 -0300 Subject: constrained some fields, first move grace config, bugfixes --- src/types.rs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'src/types.rs') 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)] -- cgit v1.2.3