Show / Hide Table of Contents

Class Walker

Inheritance
System.Object
Walker
Namespace: Sylves
Assembly: Sylves.dll
Syntax
public class Walker : Object

Constructors

Walker(IGrid, Cell, CellDir)

Declaration
public Walker(IGrid grid, Cell cell, CellDir dir)
Parameters
Type Name Description
IGrid grid
Cell cell
CellDir dir

Properties

Cell

Declaration
public Cell Cell { get; set; }
Property Value
Type Description
Cell

Dir

Declaration
public CellDir Dir { get; set; }
Property Value
Type Description
CellDir

Grid

Declaration
public IGrid Grid { get; set; }
Property Value
Type Description
IGrid

Methods

MoveForward()

Moves the walker one step in the current direction, updating Cell and Dir.

Declaration
public void MoveForward()
Exceptions
Type Condition
System.Exception

MoveForward(Boolean)

As MoveForward, but handles the case of odd sided polygons by picking either the left or right direction.

Declaration
public void MoveForward(bool bearLeft)
Parameters
Type Name Description
System.Boolean bearLeft

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String

TurnLeft()

Declaration
public void TurnLeft()

TurnRight()

Declaration
public void TurnRight()
In This Article
Back to top Generated by DocFX