Struct roguelike::Game [] [src]

pub struct Game {
    pub position: (usize, usize),
    pub action: Action,
    // some fields omitted
}

The Game with accompanying state

Fields

Position of the player, defined as (row, column) coordinate on the world map

Last action that you took

Methods

impl Game
[src]

Initialize a new game state and optionally print it

Getter for the count of moves made

Getter for the current score

Getter for whether or not the game has been won

Euclidean distance to the goal

Enter move and optionally print the map, returning whether or not this move won the game

Prints the map on screen

Trait Implementations

impl PartialEq for Game
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Game
[src]

impl Hash for Game
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Clone for Game
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more