[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:
parent
7f4485ed51
commit
7071f6a742
3 changed files with 10 additions and 6 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue