Struct tic_tac_toe::board::WinnerInfo
source · pub struct WinnerInfo {
pub team: Team,
pub tile_indexes: [u8; 3],
pub win_type: WinType,
}
Expand description
Winner Info
Fields§
§team: Team
The winning team
tile_indexes: [u8; 3]
The tile_indexes that are part of the win.
Sorted from least to greatest.
win_type: WinType
The win type
Implementations§
source§impl WinnerInfo
impl WinnerInfo
sourcepub fn start_tile_index(&self) -> u8
pub fn start_tile_index(&self) -> u8
Get the least tile index
sourcepub fn end_tile_index(&self) -> u8
pub fn end_tile_index(&self) -> u8
Get the highest tile index
Trait Implementations§
source§impl Clone for WinnerInfo
impl Clone for WinnerInfo
source§fn clone(&self) -> WinnerInfo
fn clone(&self) -> WinnerInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for WinnerInfo
impl Debug for WinnerInfo
source§impl Hash for WinnerInfo
impl Hash for WinnerInfo
source§impl PartialEq for WinnerInfo
impl PartialEq for WinnerInfo
source§fn eq(&self, other: &WinnerInfo) -> bool
fn eq(&self, other: &WinnerInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for WinnerInfo
impl Eq for WinnerInfo
impl StructuralEq for WinnerInfo
impl StructuralPartialEq for WinnerInfo
Auto Trait Implementations§
impl RefUnwindSafe for WinnerInfo
impl Send for WinnerInfo
impl Sync for WinnerInfo
impl Unpin for WinnerInfo
impl UnwindSafe for WinnerInfo
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