Struct twozero48::Game[][src]

pub struct Game { /* fields omitted */ }
Expand description

An object that models the board to play 2048 on and defines the rules for the game

Implementations

Constructs a board to play the game board_size >= 2, defines board’s length & breadth winning >= 4 and a power of 2, defines the value for game to havae been won

Return immutable reference to the board

Returns the value for winning

To refresh and return a reference to the game board after a valid move

Game API entry-point, operated by Move as input Output bool is used to check if move caused any change to the board

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.