diff options
author | stale <redkugelblitzin@gmail.com> | 2022-05-29 20:45:03 -0300 |
---|---|---|
committer | stale <redkugelblitzin@gmail.com> | 2022-05-29 20:45:03 -0300 |
commit | bcd5764aa03e128e06c355272b7b81eac8d4501d (patch) | |
tree | 44e1076c24680325a02317c29d4838c547a6c49d /src/minesweeper.rs | |
parent | 8e8fb7c45e8088843b71cb55fede723b2f9c7ff2 (diff) |
improved pubs listing, many minor fixes
Diffstat (limited to 'src/minesweeper.rs')
-rw-r--r-- | src/minesweeper.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/minesweeper.rs b/src/minesweeper.rs index c81aa09..a494b94 100644 --- a/src/minesweeper.rs +++ b/src/minesweeper.rs @@ -3,6 +3,8 @@ use std::{ num::NonZeroUsize, }; use rand::{ thread_rng, Rng, distributions::Uniform }; +use serde::Serialize; + const HIDDEN_BIT: u8 = 1 << 7; pub const FLAGGED_BIT: u8 = 1 << 6; const CORRECT_BIT: u8 = 1 << 5; // grading for a rightly flagged mine @@ -29,7 +31,7 @@ pub struct Game { pub board_conf: BoardConf, } -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, Serialize)] pub struct BoardConf { pub w: NonZeroUsize, pub h: NonZeroUsize, |