[board] Cave to pressure and implement fmt::Display for Position

It prints a nice diagram!

Now I can make the position module private.
This commit is contained in:
Eryn Wells 2024-01-19 18:11:27 -08:00
parent 7f4485ed51
commit 7071f6a742
3 changed files with 10 additions and 6 deletions

View file

@ -1,5 +1,4 @@
use board::piece::{Color, Piece, Shape};
use board::position::DiagramFormatter;
use board::{Position, Square};
use clap::{Arg, Command};
use rustyline::error::ReadlineError;
@ -80,8 +79,7 @@ fn main() -> Result<(), String> {
let mut pos = Position::empty();
loop {
let diagram = DiagramFormatter::new(&pos);
println!("{}", diagram);
println!("{}", &pos);
let readline = editor.readline("? ");
match readline {