abstract away more coordinates
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
use super::board_value::BoardValueMap;
|
||||
use crate::repr::{Board, Coord, Piece, Winner};
|
||||
use crate::repr::{Board, CoordPair, Piece, Winner};
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Move {
|
||||
/// Coordinates (i, j) of the move (if it exists)
|
||||
pub coord: Option<(Coord, Coord)>,
|
||||
pub coord: Option<CoordPair>,
|
||||
|
||||
/// [`Board`] state after move is made
|
||||
pub board: Board,
|
||||
@@ -40,12 +40,7 @@ lazy_static! {
|
||||
}
|
||||
|
||||
impl Move {
|
||||
pub fn new(
|
||||
coord: Option<(Coord, Coord)>,
|
||||
board: Board,
|
||||
color: Piece,
|
||||
agent_color: Piece,
|
||||
) -> Self {
|
||||
pub fn new(coord: Option<CoordPair>, board: Board, color: Piece, agent_color: Piece) -> Self {
|
||||
let mut m = Move {
|
||||
coord,
|
||||
board,
|
||||
|
||||
Reference in New Issue
Block a user