fix play loop

This commit is contained in:
Henri Bourcereau 2024-03-29 21:04:58 +01:00
parent 6ceefe01ab
commit 6a0dc9395a
4 changed files with 48 additions and 24 deletions

View file

@ -28,7 +28,7 @@ fn transpose(matrix: Vec<Vec<String>>) -> Vec<Vec<String>> {
impl CheckerMove {
pub fn new(from: Field, to: Field) -> Result<Self, Error> {
println!("from {} to {}", from, to);
// println!("from {} to {}", from, to);
// check if the field is on the board
// we allow 0 for 'to', which represents the exit of a checker
if from < 1 || 24 < from || 24 < to {