Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: bool TryMove<TCell, TDirection>(this Structure<TCell>, TCell, TDirection, out TCell, int)

Declaration

public static bool TryMove<TCell, TDirection>(
    this Structure<TCell> structure,
    TCell cell,
    TDirection direction,
    out TCell newCell,
    int amount = 1
)

Summary

Determines whether it is possible within structure to move the specified amount of steps in the specified direction and sets newCell to the cell landed on.

Generic type parameters

TCell
  • Must derive from: RT.Coordinates.IHasDirection<TCell, TDirection>.
This type parameter is not documented.
TDirectionThis type parameter is not documented.

Parameters

this Structure<TCell>structure The structure to examine.
TCellcell Starting cell.
TDirectiondirection Direction to attempt to move in.
out TCellnewCell Receives the cell landed on.
intamount Number of steps to move.