Remote Explorer Game
Search Results for

    Show / Hide Table of Contents

    Class VisualSessionIdentifier

    Visual identifier for a session (two-character symbol + console color). Performs validation against reserved patterns and map tile collisions.

    Inheritance
    object
    VisualSessionIdentifier
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: ExplorerGame.Core
    Assembly: explorer-game.dll
    Syntax
    public class VisualSessionIdentifier

    Constructors

    | Edit this page View Source

    VisualSessionIdentifier(string, ConsoleColor, Tile?[,]?)

    Creates a new visual session identifier and validates string and color.

    Declaration
    public VisualSessionIdentifier(string identifierStr, ConsoleColor color = ConsoleColor.White, Tile?[,]? map = null)
    Parameters
    Type Name Description
    string identifierStr

    Two-character identifier string.

    ConsoleColor color

    Console color for the identifier.

    Tile?[,] map

    Optional map for tile-collision checks.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the identifier string is too long, the color is invalid, or the combination is reserved.

    Fields

    | Edit this page View Source

    ERROR_IDENTIFIER

    Special identifier used to indicate an error state.

    Declaration
    public static readonly VisualSessionIdentifier ERROR_IDENTIFIER
    Field Value
    Type Description
    VisualSessionIdentifier
    | Edit this page View Source

    INVALID_COLORS

    Colors that are not allowed for identifiers (e.g., current console background).

    Declaration
    public static readonly HashSet<ConsoleColor> INVALID_COLORS
    Field Value
    Type Description
    HashSet<ConsoleColor>
    | Edit this page View Source

    SESSION_COUNTER_COLOR

    Color used when rendering a numeric counter for multiple agents on the same tile.

    Declaration
    public const ConsoleColor SESSION_COUNTER_COLOR = Yellow
    Field Value
    Type Description
    ConsoleColor

    Properties

    | Edit this page View Source

    Color

    Console color associated with this identifier.

    Declaration
    public ConsoleColor Color { get; set; }
    Property Value
    Type Description
    ConsoleColor
    Exceptions
    Type Condition
    ArgumentException

    Thrown when the color is not allowed or would make the identifier reserved.

    | Edit this page View Source

    IdentifierStr

    Two-character identifier string used for rendering.

    Declaration
    public string IdentifierStr { get; set; }
    Property Value
    Type Description
    string
    Exceptions
    Type Condition
    ArgumentException

    Thrown when the string is longer than 2 characters or would make the identifier reserved.

    Methods

    | Edit this page View Source

    IsReserved(VisualSessionIdentifier, Tile?[,]?)

    Returns true if the given identifier instance is reserved.

    Declaration
    public static bool IsReserved(VisualSessionIdentifier identifier, Tile?[,]? map = null)
    Parameters
    Type Name Description
    VisualSessionIdentifier identifier
    Tile?[,] map
    Returns
    Type Description
    bool
    | Edit this page View Source

    IsReserved(string, ConsoleColor, Tile?[,]?)

    Returns true if the provided string/color combination is reserved. Checks reserved patterns and (optionally) collisions with map tile strings.

    Declaration
    public static bool IsReserved(string identifierStr, ConsoleColor color, Tile?[,]? map = null)
    Parameters
    Type Name Description
    string identifierStr

    Two-character identifier.

    ConsoleColor color

    Requested console color.

    Tile?[,] map

    Optional map to detect collisions with tile strings.

    Returns
    Type Description
    bool
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX