O1Library Docs
Fall 2023
Docs API

# mutable

o1.world.objects.mutable$
object mutable

This subpackage defines a few additional traits that extend the ones in of o1.world.objects. These traits provide additional convenience methods for working with mutable objects in two-dimensional space.

NOTE TO STUDENTS: In this course, you don’t need to understand how this package works or can be used. That being said, some students may wish to experiment with some of its contents. Several of the traits in this package have aliases in the top-level package o1, so they are accessible to students simply via `import o1.*`.

## Attributes

Graph
Supertypes
  class Object
  trait Matchable
  class Any
Self type
  mutable.type

## Members list

### Type members

#### Classlikes

trait ContainedObject extends MutablePos, HasContainer

A supertype for objects that take up a rectangular area and have a mutable position that may be constrained by a larger object around them.

A supertype for objects that take up a rectangular area and have a mutable position that may be constrained by a larger object around them.

## Attributes

Supertypes
  trait HasContainer
  trait HasEdges
  trait HasAnchor
  trait HasSize
  trait MutablePos
  trait HasPos
  class Object
  trait Matchable
  class Any
  Show all
Known subtypes
  trait MovingObjectInContainer

trait MovingObject extends HasVelocity, MutablePos

A supertype for objects that have a mutable position and a velocity in two-dimensional space.

A supertype for objects that have a mutable position and a velocity in two-dimensional space.

## Attributes

Supertypes
  trait MutablePos
  trait HasVelocity
  trait HasPos
  class Object
  trait Matchable
  class Any
  Show all

trait MovingObjectInContainer extends ContainedObject, HasVelocity

A supertype for objects that take up a rectangular area and have a velocity as well as a mutable position that may be constrained by a larger object around them.

A supertype for objects that take up a rectangular area and have a velocity as well as a mutable position that may be constrained by a larger object around them.

## Attributes

Supertypes
  trait HasVelocity
  trait ContainedObject
  trait HasContainer
  trait HasEdges
  trait HasAnchor
  trait HasSize
  trait MutablePos
  trait HasPos
  class Object
  trait Matchable
  class Any
  Show all

trait MutablePos extends HasPos

A supertype for objects that have a mutable location in two-dimensional space.

A supertype for objects that have a mutable location in two-dimensional space.

## Attributes

Supertypes
  trait HasPos
  class Object
  trait Matchable
  class Any
Known subtypes
  trait ContainedObject
  trait MovingObjectInContainer
  trait MovingObject