public byte Left() { if (_pos.X > 0) { --_pos.X; } else { _chunk = _chunk.Next.Left; _pos.X = (byte)(_chunk.Width - 1); } return(Here()); }
public byte Down() { if (_pos.Y < _chunk.Height - 1) { ++_pos.Y; } else { _chunk = _chunk.Next.Down; _pos.Y = 0; } return(Here()); }
public byte Right() { if (_pos.X < _chunk.Width - 1) { ++_pos.X; } else { _chunk = _chunk.Next.Right; _pos.X = 0; } return(Here()); }
public byte Up() { if (_pos.Y > 0) { --_pos.Y; } else { _chunk = _chunk.Next.Up; _pos.Y = (byte)(_chunk.Height - 1); } return(Here()); }
public byte Reset() { _chunk = _startChunk; _pos = _startPos; return(Here()); }
public ChunkIterator(BasicChunk chunk, LocalPos pos) { this._chunk = _startChunk = chunk; this._pos = _startPos = pos; }