pub struct Ale {}Implementations§
Source§impl Ale
impl Ale
pub fn new(rom_path: &Path, config: AleConfig) -> Self
pub fn available_actions(&self) -> Vec<AleAction>
pub fn minimal_actions(&self) -> Vec<AleAction>
pub fn is_game_over(&self) -> bool
Sourcepub fn rom_frame_number(&self) -> i32
pub fn rom_frame_number(&self) -> i32
frame number since rom loading (Ale::new)
Sourcepub fn episode_frame_number(&self) -> i32
pub fn episode_frame_number(&self) -> i32
frame number of the current episode
pub fn reset(&mut self)
Sourcepub fn take_action(&mut self, action: AleAction) -> i32
pub fn take_action(&mut self, action: AleAction) -> i32
returns reward
pub fn lives(&self) -> u32
pub fn available_difficulty_settings(&self) -> Vec<i32>
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn rgb24_size(&self) -> usize
Sourcepub fn rgb24_native_endian(&self, buf: &mut [u8])
pub fn rgb24_native_endian(&self, buf: &mut [u8])
bgr on little-endian, rgb on big-endian
pub fn rgb32_size(&self) -> usize
pub fn ram_size(&self) -> usize
pub fn ram(&self, buf: &mut [u8])
pub fn save_png<P: AsRef<Path>>(&self, path: P)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ale
impl RefUnwindSafe for Ale
impl Sync for Ale
impl Unpin for Ale
impl UnwindSafe for Ale
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more