fix play loop
This commit is contained in:
parent
6ceefe01ab
commit
6a0dc9395a
4 changed files with 48 additions and 24 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue