pub struct RotchessEmulator { /* private fields */ }
Implementations§
Source§impl RotchessEmulator
Misc.
impl RotchessEmulator
Misc.
Source§impl RotchessEmulator
Helpful functions for the update portion of a game loop implementing rotchess.
impl RotchessEmulator
Helpful functions for the update portion of a game loop implementing rotchess.
TODO Future plans: add another impl block for a headless updater? ie, “can i move this piece here,” “where can i move this piece”. useful for ml?
Sourcepub fn update_travelpoints_unchecked(&mut self)
pub fn update_travelpoints_unchecked(&mut self)
Log the current selected piece’s travelpoints in the internal buffer.
Such a piece index must exist. Will initialize the piece’s internal auxiliary data if required. Will update internal auxiliary data always.
pub fn make_best_move(&mut self)
Sourcepub fn handle_event(&mut self, e: Event) -> Option<ThingHappened>
pub fn handle_event(&mut self, e: Event) -> Option<ThingHappened>
Handle an event.
Priority order (high to low) for clicks:
- rotation dragging
- captures
- piece selection
- moves
Source§impl RotchessEmulator
Helpful functions for the draw portion of a game loop implementing rotchess.
impl RotchessEmulator
Helpful functions for the draw portion of a game loop implementing rotchess.
Auto Trait Implementations§
impl Freeze for RotchessEmulator
impl RefUnwindSafe for RotchessEmulator
impl Send for RotchessEmulator
impl Sync for RotchessEmulator
impl Unpin for RotchessEmulator
impl UnwindSafe for RotchessEmulator
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