19 lines
305 B
Rust
19 lines
305 B
Rust
|
// Eryn Wells <eryn@erynwells.me>
|
||
|
|
||
|
use crate::Board;
|
||
|
|
||
|
pub trait BoardProvider {
|
||
|
fn board(&self) -> &Board;
|
||
|
fn board_mut(&mut self) -> &mut Board;
|
||
|
}
|
||
|
|
||
|
impl BoardProvider for Board {
|
||
|
fn board(&self) -> &Board {
|
||
|
self
|
||
|
}
|
||
|
|
||
|
fn board_mut(&mut self) -> &mut Board {
|
||
|
self
|
||
|
}
|
||
|
}
|