Use lsb and have_common_bit fn's for readability
This commit is contained in:
@@ -19,13 +19,13 @@ pub enum MoveType {
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
|
||||
pub struct Move {
|
||||
pub source: u32,
|
||||
pub target: u32,
|
||||
pub source: usize,
|
||||
pub target: usize,
|
||||
pub move_type: MoveType,
|
||||
}
|
||||
|
||||
impl Move {
|
||||
pub const fn new(source: u32, target: u32) -> Self {
|
||||
pub const fn new(source: usize, target: usize) -> Self {
|
||||
Self {
|
||||
source,
|
||||
target,
|
||||
@@ -33,7 +33,7 @@ impl Move {
|
||||
}
|
||||
}
|
||||
|
||||
pub const fn new_with_type(source: u32, target: u32, move_type: MoveType) -> Self {
|
||||
pub const fn new_with_type(source: usize, target: usize, move_type: MoveType) -> Self {
|
||||
Self {
|
||||
source,
|
||||
target,
|
||||
|
||||
Reference in New Issue
Block a user