Suit enum cards

Enum for card suits and their most basic methods. (see Suit @ wiki)

The actual numbers are important here: change them and you will break some tests and compatibility with the Rust code.

Inheritance
Implemented types

Constructors

Suit()
const

Values

None → const Suit
Club → const Suit
Diamond → const Suit
Heart → const Suit
Spade → const Suit

Properties

article String
For consistency with rank, not really needed
no setter
hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String
Full English name
no setter
plural String
Full English plural name, not really needed but for consistency
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(Suit other) int
Compares this object to another object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toChar() String
Render as text
toString() String
A string representation of this object.
inherited
toUnicode() String
Render as unicode symbol

Operators

operator <(Suit other) bool
operator <=(Suit other) bool
operator ==(Object other) bool
The equality operator.
inherited
operator >(Suit other) bool
operator >=(Suit other) bool

Static Methods

fromChar(String c) Suit?
Create one from text character or unicode symbol.

Constants

values → const List<Suit>
A constant List of the values in this enum, in order of their declaration.