[][src]Struct romy_core::Info

pub struct Info { /* fields omitted */ }

Holds information about the Game

Methods

impl Info[src]

pub fn new(
    name: &str,
    steps_per_second: i32,
    number_of_players: i32,
    input: InputDeviceType
) -> Self
[src]

Create a new structure of info about the game being played

Arguments

  • name - The title of the game
  • steps_per_second - The number of times Game::Step() should be called per second
  • number_of_players - How many players this games should have
  • input - The device type to use for each player

pub fn name(&self) -> &str[src]

Gets the name of the game

pub fn step_interval(&self) -> u32[src]

Gets time between steps of the game, in nanoseconds

pub fn steps_per_second(&self) -> u32[src]

pub fn steps_per_second_to_interval(steps: i32) -> u32[src]

Converts from steps per second to a time interval in nanoseconds

Trait Implementations

impl Clone for Info[src]

impl Debug for Info[src]

impl<'de> Deserialize<'de> for Info[src]

impl Serialize for Info[src]

Auto Trait Implementations

impl RefUnwindSafe for Info

impl Send for Info

impl Sync for Info

impl Unpin for Info

impl UnwindSafe for Info

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.