[][src]Enum wasmdome_mech_sdk::MechCommand

pub enum MechCommand {
    Move {
        turn: u32,
        mech: String,
        direction: GridDirection,
    },
    FirePrimary {
        turn: u32,
        mech: String,
        direction: GridDirection,
    },
    FireSecondary {
        turn: u32,
        mech: String,
        direction: GridDirection,
    },
    RequestRadarScan {
        turn: u32,
        mech: String,
    },
    SpawnMech {
        mech: String,
        position: Point,
        team: String,
        avatar: String,
        name: String,
    },
    FinishTurn {
        mech: String,
        turn: u32,
    },
    RegisterUpdate {
        mech: String,
        turn: u32,
        reg: u32,
        op: RegisterOperation,
    },
}

Variants

Move

Fields of Move

turn: u32mech: Stringdirection: GridDirection
FirePrimary

Fields of FirePrimary

turn: u32mech: Stringdirection: GridDirection
FireSecondary

Fields of FireSecondary

turn: u32mech: Stringdirection: GridDirection
RequestRadarScan

Fields of RequestRadarScan

turn: u32mech: String
SpawnMech

Fields of SpawnMech

mech: Stringposition: Pointteam: Stringavatar: Stringname: String
FinishTurn

Marks a turn as complete. One of these must be at the end of every array that comes out of an actor's turn (the developer will not need to manually append this, the SDK will)

Fields of FinishTurn

mech: Stringturn: u32
RegisterUpdate

Mech Register Commands

Fields of RegisterUpdate

mech: Stringturn: u32reg: u32op: RegisterOperation

Implementations

impl MechCommand[src]

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

Trait Implementations

impl Clone for MechCommand[src]

impl Debug for MechCommand[src]

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

impl Serialize for MechCommand[src]

Auto Trait Implementations

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: for<'de> 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.