Documentation ¶
Overview ¶
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
Index ¶
- Constants
- type Auction
- type Call
- type CallSuffix
- type CallToken
- type Card
- type Contract
- type Date
- type Deal
- type Declarer
- type Denomination
- type Game
- type MetaData
- type NAG
- type Note
- type PBN
- type Pair
- type Play
- type PlayCard
- type PlayCardSuffix
- type Rank
- type Risk
- type Score
- type Seat
- type Suit
- type Time
- type TimeControl
- type Trick
Constants ¶
const ( CallSuffixGoodCall = "!" CallSuffixPoorCall = "?" CallSuffixVeryGoodCall = "!!" CallSuffixVeryPoorCall = "??" CallSuffixSpeculativeCall = "!?" CallSuffixQuestionableCall = "?!" )
const ( NAGNoAnnotation = "$0" NAGGoodCall = "$1" NAGPoorCall = "$2" NAGVeryGoodCall = "$3" NAGVeryPoorCall = "$4" NAGSpeculativeCall = "$5" NAGQuestionableCall = "$6" NAGGoodCard = "$7" NAGPoorCard = "$8" NAGVeryGoodCard = "$9" NAGVeryPoorCard = "$10" NAGSpeculativeCard = "$11" NAGQuestionableCard = "$12" NAGCallHasBeenCorrectedManually = "$13" NAGCardHasBeenCorrectedManually = "$14" )
const ( CallTokenAP = "AP" CallTokenPass = "Pass" CallTokenX = "X" CallTokenXX = "XX" )
const ( RankTwo = "2" RankThree = "3" RankFour = "4" RankFive = "5" RankSix = "6" RankSeven = "7" RankEight = "8" RankNine = "9" RankTen = "T" RankJack = "J" RankQueen = "Q" RankKing = "K" RankAce = "A" )
const ( SuitSpades = "S" SuitHearts = "H" SuitDiamonds = "D" SuitClubs = "C" )
const ( RiskUndoubled = "" RiskDouble = "X" RiskRedouble = "XX" )
const ( DenominationSpades = "S" DenominationHearts = "H" DenominationDiamonds = "D" DenominationClubs = "C" DenominationNoTrump = "NT" )
const ( PairNoPair = "None" PairEastWest = "EW" PairNorthSouth = "NS" PairBoth = "Both" )
const ( PlayCardSuffixGoodCard = "!" PlayCardSuffixPoorCard = "?" PlayCardSuffixVeryGoodCard = "!!" PlayCardSuffixVeryPoorCard = "??" PlayCardSuffixSpeculativeCard = "!?" PlayCardSuffixQuestionableCard = "?!" )
const ( NoSeat = "None" West = "W" North = "N" East = "E" South = "S" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auction ¶
type Call ¶
type Call struct { Token string `json:"token"` SuffixAnnotation CallSuffix `json:"suffix_annotation,omitempty"` NoteReference string `json:"note_reference,omitempty"` NAGs []string `json:"nags,omitempty"` }
type CallSuffix ¶
type CallSuffix string
type Contract ¶
type Contract struct { Tricks int `json:"tricks"` Denomination Denomination `json:"denomination"` Risk Risk `json:"risk"` Pass bool `json:"pass"` }
func GetContract ¶
type Deal ¶
type Declarer ¶
func GetDeclarer ¶
type Denomination ¶
type Denomination string
type Game ¶
type Game struct { // Mandatory tags. Event string `json:"event"` Site string `json:"site"` Date Date `json:"date"` Board string `json:"board"` West string `json:"west"` North string `json:"north"` East string `json:"east"` South string `json:"south"` Dealer Seat `json:"seat"` Vulnerable Pair `json:"vulnerable"` Deal Deal `json:"deal"` // Game related information. Competition string `json:"competition,omitempty"` DealId string `json:"deal_id,omitempty"` Description string `json:"description,omitempty"` FrenchMP bool `json:"french_mp,omitempty"` Generator string `json:"generator,omitempty"` Hidden []Seat `json:"hidden,omitempty"` Room string `json:"room,omitempty"` Termination string `json:"termination,omitempty"` // Score related information. Score Score[int] `json:"score,omitempty"` ScoreIMP Score[int] `json:"score_imp,omitempty"` ScoreMP Score[int] `json:"score_mp,omitempty"` ScorePercentage Score[float32] `json:"score_percentage,omitempty"` ScoreRubber [2]int `json:"score_rubber,omitempty"` // Player related information. BidSystemEW string `json:"bid_system_ew,omitempty"` BidSystemNS string `json:"bid_system_ns,omitempty"` PairEW string `json:"pair_ew,omitempty"` PairNS string `json:"pair_ns,omitempty"` WestNA string `json:"west_na,omitempty"` NorthNA string `json:"north_na,omitempty"` EastNA string `json:"east_na,omitempty"` SouthNA string `json:"south_na,omitempty"` WestType string `json:"west_type,omitempty"` NorthType string `json:"north_type,omitempty"` EastType string `json:"east_type,omitempty"` SouthType string `json:"south_type,omitempty"` // Event related information. EventDate Date `json:"event_date,omitempty"` EventSponsor string `json:"event_sponsor,omitempty"` HomeTeam string `json:"home_team,omitempty"` Round string `json:"round,omitempty"` Section string `json:"section,omitempty"` Stage string `json:"stage,omitempty"` Table string `json:"table,omitempty"` VisitTeam string `json:"visit_team,omitempty"` // Time and date related information. Time Time `json:"time,omitempty"` UTCDate Time `json:"utc_date,omitempty"` UTCTime Time `json:"utc_time,omitempty"` // Time control. TimeControl TimeControl `json:"time_control,omitempty"` TimeCall int `json:"time_call,omitempty"` TimeCard int `json:"time_card,omitempty"` // Miscellaneous. Annotator string `json:"annotator,omitempty"` AnnotatorNA string `json:"annotator_na,omitempty"` Application string `json:"application,omitempty"` Mode string `json:"mode,omitempty"` // Auction Auction Auction `json:"auction"` Play Play `json:"play"` // Others. Declarer Declarer `json:"declarer,omitempty"` Contract Contract `json:"contract,omitempty"` Result Score[int] `json:"result,omitempty"` Scoring []string `json:"scoring,omitempty"` }
type Play ¶
type PlayCard ¶
type PlayCard struct { Token string `json:"token"` SuffixAnnotation PlayCardSuffix `json:"suffix_annotation,omitempty"` NoteReference string `json:"note_reference,omitempty"` NAGs []string `json:"nags,omitempty"` }
type PlayCardSuffix ¶
type PlayCardSuffix string
type Score ¶
type Time ¶
type TimeControl ¶
type TimeControl struct { Games int `json:"games,omitempty"` Minutes int `json:"minutes,omitempty"` }
func GetTimeControl ¶
func GetTimeControl(s string) (TimeControl, error)