diff options
Diffstat (limited to 'src/square.rs')
| -rw-r--r-- | src/square.rs | 9 | 
1 files changed, 8 insertions, 1 deletions
diff --git a/src/square.rs b/src/square.rs index 8a268ea..c7f185e 100644 --- a/src/square.rs +++ b/src/square.rs @@ -1,4 +1,4 @@ -use std::str::Chars; +use std::{str::Chars, fmt::Display};  use crate::bitboard::Bitboard; @@ -91,4 +91,11 @@ impl Square {      }  } +impl Display for Square { +    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +        let notation = format!("{:?}", self).to_lowercase(); +        write!(f, "{}", notation) +    } +} +  |