_ makes the thing not yell at me
This commit is contained in:
@@ -104,12 +104,12 @@ pub fn get_legal_moves(
|
|||||||
(row, col): &(usize, usize),
|
(row, col): &(usize, usize),
|
||||||
(nrow, ncol): (usize, usize),
|
(nrow, ncol): (usize, usize),
|
||||||
) -> Vec<Direction> {
|
) -> Vec<Direction> {
|
||||||
let max_col = nrow - 1;
|
let _max_col = nrow - 1;
|
||||||
let max_row = ncol - 1;
|
let _max_row = ncol - 1;
|
||||||
let mut moves: Vec<Direction> = vec![];
|
let mut moves: Vec<Direction> = vec![];
|
||||||
match *col {
|
match *col {
|
||||||
0 => moves.push(Direction::UP),
|
0 => moves.push(Direction::UP),
|
||||||
max_row => moves.push(Direction::DOWN),
|
_max_row => moves.push(Direction::DOWN),
|
||||||
_ => {
|
_ => {
|
||||||
moves.push(Direction::UP);
|
moves.push(Direction::UP);
|
||||||
moves.push(Direction::DOWN);
|
moves.push(Direction::DOWN);
|
||||||
@@ -117,7 +117,7 @@ pub fn get_legal_moves(
|
|||||||
};
|
};
|
||||||
match *row {
|
match *row {
|
||||||
0 => moves.push(Direction::RIGHT),
|
0 => moves.push(Direction::RIGHT),
|
||||||
max_row => moves.push(Direction::LEFT),
|
_max_row => moves.push(Direction::LEFT),
|
||||||
_ => {
|
_ => {
|
||||||
moves.push(Direction::LEFT);
|
moves.push(Direction::LEFT);
|
||||||
moves.push(Direction::RIGHT)
|
moves.push(Direction::RIGHT)
|
||||||
|
|||||||
Reference in New Issue
Block a user