pub struct Board {
pub board: [Option<Players>; 9],
/* private fields */
}
Fields§
§board: [Option<Players>; 9]
Implementations§
Source§impl Board
impl Board
pub fn clear(&mut self)
pub fn set_coordinate( &mut self, x: usize, y: usize, player: Players, ) -> Result<(), &'static str>
pub fn get_coordinate( &mut self, x: usize, y: usize, ) -> Result<Option<Players>, &'static str>
pub fn has_match_line(&self) -> Option<Players>
pub fn print_matches(&self, num_of_spaces: usize)
pub fn is_full(&self) -> bool
pub fn update_matches(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Board
impl RefUnwindSafe for Board
impl Send for Board
impl Sync for Board
impl Unpin for Board
impl UnwindSafe for Board
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more