Beispiel #1
0
    public void MoveBackward()
    {
        switch (Orientation)
        {
        case Direction.North: Location = Location.AdjustYBy(-1); break;

        case Direction.East: Location = Location.AdjustXBy(-1); break;

        case Direction.South: Location = Location.AdjustYBy(1); break;

        case Direction.West: Location = Location.AdjustXBy(1); break;
        }
    }