RobotTribes Docs
Fall 2026
API

# GridPos

o1.grid.GridPos
See the GridPos companion class
object GridPos

This companion object of class `GridPos` provides a couple of utility methods.

## Attributes

Companion
  class
Graph
Supertypes
  trait Product
  trait Mirror
  class Object
  trait Matchable
  class Any
Self type
  GridPos.type

## Members list

### Type members

#### Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

## Attributes

Inherited from:
  Mirror

type MirroredLabel <: String

The name of the type.

The name of the type.

## Attributes

Inherited from:
  Mirror

### Value members

#### Concrete methods

def random(xMin: Int, xMax: Int, yMin: Int, yMax: Int): GridPos

Returns a randomly constructed `GridPos` whose `x` and `y` are between the given minima (inclusive) and maxima (exclusive). Uses the scala.util.Random singleton.

Returns a randomly constructed `GridPos` whose `x` and `y` are between the given minima (inclusive) and maxima (exclusive). Uses the scala.util.Random singleton.

## Attributes

See also

  Grid.randomPos

def random(min: Int, max: Int): GridPos

Returns a randomly constructed `GridPos` whose `x` and `y` are between the given minimum (inclusive) and maximum (exclusive). The limits for `x` and `y` are the same. Uses the scala.util.Random singleton.

Returns a randomly constructed `GridPos` whose `x` and `y` are between the given minimum (inclusive) and maximum (exclusive). The limits for `x` and `y` are the same. Uses the scala.util.Random singleton.

## Attributes

See also

  Grid.randomPos