private bool IsInTableBounds(Position.Position position) { return(position.Location.X <= Table.Width && position.Location.X >= 0 && position.Location.Y >= 0 && position.Location.Y <= Table.Height); }
public void SetCurrentPosition(Position.Position position) { if (IsNewPositionValid(position)) { CurrentPosition = position; } }
private bool IsNewPositionValid(Position.Position position) { return(position != null && IsInTableBounds(position)); }