Class Eco
Class representing ECO codes to classify opening positions
Inheritance
Implements
Inherited Members
Namespace: PonzianiComponents.Chesslib
Assembly: PonzianiComponents.dll
Syntax
[Serializable]
public class Eco : IComparable<Eco>
Properties
| Improve this Doc View SourceChapter
Chapter (Subgroups) grouping related openings
Declaration
public static SortedDictionary<Tuple<string, string>, string> Chapter { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.SortedDictionary<System.Tuple<System.String, System.String>, System.String> |
Key
The ECO code
Declaration
public string Key { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MoveString
Series of moves defining the opening
Declaration
public string MoveString { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Text
Description of the Opening
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Volumes
ECO Volume Titles
Declaration
public static SortedDictionary<char, string> Volumes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.SortedDictionary<System.Char, System.String> |
Methods
| Improve this Doc View SourceCompareTo(Eco)
Declaration
public int CompareTo(Eco other)
Parameters
Type | Name | Description |
---|---|---|
Eco | other |
Returns
Type | Description |
---|---|
System.Int32 |
Get(Game)
Determines the opening key for a game
Declaration
public static Eco Get(Game game)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game |
Returns
Type | Description |
---|---|
Eco | The ECO or null if game opening is irregular |
Get(String)
Determines the opening key for a position
Declaration
public static Eco Get(string fen)
Parameters
Type | Name | Description |
---|---|---|
System.String | fen | The position in FEN representation |
Returns
Type | Description |
---|---|
Eco | The ECO or null if position is not found |
Get(String, String)
Get Ecos from key interval
Declaration
public static SortedSet<Eco> Get(string fromKey, string toKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | fromKey | From key (e.g. "B20") |
System.String | toKey | To key (e.g. "B39") |
Returns
Type | Description |
---|---|
System.Collections.Generic.SortedSet<Eco> | Set of Ecos matching the key interval |
Get(UInt64)
Returns Eco object for a polyglot key
Declaration
public static Eco Get(ulong polyglotkey)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | polyglotkey |
Returns
Type | Description |
---|---|
Eco |
GetGame(Eco)
Returns a short game, which results in a position matching the provided ECO object
Declaration
public static Game GetGame(Eco eco)
Parameters
Type | Name | Description |
---|---|---|
Eco | eco | ECO object for which the Game, shall be provided |
Returns
Type | Description |
---|---|
Game | A game, with moves leading to the position defined by the passed ECO object |
GetID(Eco)
Determines the polyglot key of the position defined by the Eco object
Declaration
public static ulong GetID(Eco eco)
Parameters
Type | Name | Description |
---|---|---|
Eco | eco |
Returns
Type | Description |
---|---|
System.UInt64 | Polyglot Key |
Keyvariant(Eco)
Determines the base variant (the shortest variant having the same key) for a given variant
Declaration
public static Eco Keyvariant(Eco eco)
Parameters
Type | Name | Description |
---|---|---|
Eco | eco | Eco for which the base variant shall be determined |
Returns
Type | Description |
---|---|
Eco | The base variant |
Keyvariants()
Returns for each ECO-key the basic variant
Declaration
public static SortedSet<Eco> Keyvariants()
Returns
Type | Description |
---|---|
System.Collections.Generic.SortedSet<Eco> | List of basic variants |
Keyvariants(Char, String, String)
Returns for each ECO-key the basic variant
Declaration
public static SortedSet<Eco> Keyvariants(char volume, string fromKey = "A00", string toKey = "E99")
Parameters
Type | Name | Description |
---|---|---|
System.Char | volume | Volume to which result set shall be restricted |
System.String | fromKey | |
System.String | toKey |
Returns
Type | Description |
---|---|
System.Collections.Generic.SortedSet<Eco> | List of basic variants |
Subvariants(Eco)
Returns a list of Eco objects for subvariants based on a given Eco
Declaration
public static List<Eco> Subvariants(Eco eco)
Parameters
Type | Name | Description |
---|---|---|
Eco | eco | Variant for which subvariants shall be provided |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<Eco> | List of all Eco objects defining subvariants of eco |