diff options
author | stale <redkugelblitzin@gmail.com> | 2022-05-29 03:14:44 -0300 |
---|---|---|
committer | stale <redkugelblitzin@gmail.com> | 2022-05-29 03:14:44 -0300 |
commit | 2826d78bbfab50eab90e5a1611576f33e752b7d8 (patch) | |
tree | d97f56ae29ea7ddbcafd68d5bc233102a236e284 /src/types.rs | |
parent | fae0fca7aabb81325a296a1d6202239c3db44b60 (diff) |
constrained some fields, first move grace config, bugfixes
Diffstat (limited to 'src/types.rs')
-rw-r--r-- | src/types.rs | 16 |
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)] |