Table of Contents

Struct Cell

Namespace
Termule.Engine.Types
Assembly
Termule.Engine.dll

Single cell on a terminal.

public struct Cell : IEquatable<Cell>
Implements
Inherited Members

Remarks

Initializes a new instance of the Cell struct.

Constructors

Cell(Color, char, Color)

Single cell on a terminal.

public Cell(Color color = default, char glyph = '\0', Color charColor = default)

Parameters

color Color

The background color of the cell.

glyph char

The glyph in the cell.

charColor Color

The color of the cell's glyph.

Remarks

Initializes a new instance of the Cell struct.

Properties

Color

Gets or sets the background color of the cell.

public Color Color { readonly get; set; }

Property Value

Color

Glyph

Gets or sets the glyph in the cell.

public char Glyph { readonly get; set; }

Property Value

char

GlyphColor

Gets or sets the color of the cell's glyph.

public Color GlyphColor { readonly get; set; }

Property Value

Color

Methods

Equals(object)

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Equals(Cell)

Indicates whether the current object is equal to another object of the same type.

public readonly bool Equals(Cell other)

Parameters

other Cell

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override readonly int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Operators

operator ==(Cell, Cell)

Compares two cells by value and returns whether they match.

public static bool operator ==(Cell c1, Cell c2)

Parameters

c1 Cell

The first cell.

c2 Cell

The second cell.

Returns

bool

If all cell values are equal.

operator !=(Cell, Cell)

Compares two cells by value and returns whether they don't match.

public static bool operator !=(Cell c1, Cell c2)

Parameters

c1 Cell

The first cell.

c2 Cell

The second cell.

Returns

bool

If any cell values are different.