diff --git a/Cargo.lock b/Cargo.lock index 9969739..685881f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -100,7 +100,7 @@ checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" [[package]] name = "c2g" -version = "0.3.0" +version = "0.3.1" dependencies = [ "clap", "env_logger", diff --git a/Cargo.toml b/Cargo.toml index fe1fc7a..8707130 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "c2g" -version = "0.3.0" +version = "0.3.1" authors = ["Tomas Farias "] edition = "2018" diff --git a/src/drawer.rs b/src/drawer.rs index cac63c5..9e3d264 100644 --- a/src/drawer.rs +++ b/src/drawer.rs @@ -295,6 +295,12 @@ impl BoardDrawer { } Move::EnPassant { from, to } => { self.draw_square(from, img)?; + // Need to delete the pawn that was taken + // This pawn is in the same Rank as from + // And the same File as to + let taken_pawn = Square::from_coords(to.file(), from.rank()); + self.draw_square(&taken_pawn, img)?; + self.draw_piece(to, &Role::Pawn, color, true, img)?; } Move::Castle { king, rook } => {