mirror of
https://github.com/szymon-jozef/checkers.git
synced 2026-10-27 19:20:44 +01:00
refactor: split board logic into logic module
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
use crate::logic::{
|
||||
board::{
|
||||
field::Field,
|
||||
math::{position::Position, vector::Vector2D},
|
||||
pawn::{CapturePath, Pawn, PawnState},
|
||||
},
|
||||
math::{position::Position, vector::Vector2D},
|
||||
player::Player,
|
||||
};
|
||||
|
||||
use std::{
|
||||
backtrace::BacktraceStatus::Captured,
|
||||
ops::{Index, IndexMut},
|
||||
};
|
||||
use std::ops::{Index, IndexMut};
|
||||
|
||||
use log::{debug, info, warn};
|
||||
|
||||
@@ -463,7 +462,6 @@ impl IndexMut<Position> for Board {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::logic::pawn::PawnState;
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::fmt;
|
||||
|
||||
use crate::logic::{math::position::Position, pawn::Pawn};
|
||||
use crate::logic::{board::pawn::Pawn, math::position::Position};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct Field {
|
||||
3
src/logic/board/mod.rs
Normal file
3
src/logic/board/mod.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
pub mod board;
|
||||
mod field;
|
||||
mod pawn;
|
||||
@@ -1,5 +1,3 @@
|
||||
mod board;
|
||||
mod field;
|
||||
pub mod board;
|
||||
mod math;
|
||||
mod pawn;
|
||||
mod player;
|
||||
|
||||
Reference in New Issue
Block a user