ArcherArcher
Home
Quick Start
Project Introduction
  • 简体中文
  • English
Home
Quick Start
Project Introduction
  • 简体中文
  • English
  • Home
  • Basic Configuration

    • Project Introduction
    • Quick Start
    • FAQ
    • Contact Us
  • Advanced Development

    • Basic Knowledge
    • Basic Framework
    • Majsoul Development

      • Tile Names

        • Basic
      • Manager

        • Lobby Manager
      • Game Interfaces

        • Basic
      • LQ

        • Basic
      • Action Types

        • Basic
      • Game State

        • Basic
      • Login Event

        • Login Event
        • Advanced - Mahjong Event Login
      • Discard Actions

        • Basics
        • Advanced
      • Chii (Eat)
      • Pon
      • Kong
      • Cancel, Skip
  • Plugin System

    • Basic Usage
    • Resource Plugin Development
  • Auto Review

    • Automatic Review
  • Tenhou Room

    • Playing in Tenhou Private Room with Mortal Bot

Package Name

  • gamestate

Import

  • import "github.com/moxcomic/Archer/gamestate"

Constants

NameTypeValueNotes
RoundEndReasonHuleint0
RoundEndReasonRyuukyokuint1

RoundEnd

NameTypeNotes
ReasonintReason for round end
Deltas[]intScore changes for players
Hules[]*Hules

Hules

NameTypeNotes
SeatintSeat number
TsumoboolTsumo (self-draw win)
PointintPoints earned

Interface Methods

NameParametersReturn ValueNotes
InstNone*gamestate.GameStateGameState interface instance

Instance Methods

NameParametersReturn ValueNotes
IsOnChiPonNoneboolWhether it's in Chii, Pon, or Kan phase
IsOnBabeiNoneboolWhether it's in Babei phase
IsRoundWindNoneboolWhether it's the current round's wind
IsSelfWindNoneboolWhether it's the player's own wind
IsCanWinNoneboolWhether the player can win
IsLiqi3NoneboolWhether it is a three-player mahjong
ChangNoneintCurrent round: 0=East, 1=South, 2=West
BenNoneintCurrent round number
JuNoneintCurrent hand number
OyaNoneintSeat number of the dealer
ScoreNone[]intPlayer scores
DiscardTileNone[][]stringTiles in each player's discard pile
RiichiNone[]boolRiichi status of each player
IsCanintboolWhether action (x) can be performed
IsCanOperationsNoneboolWhether any actions can be performed
IsOperationuint32boolDeprecated
SetUserUseMouseboolNoneSet whether the user is using the mouse
HandTileNone[]stringPlayer's hand tiles
OperationCombinationuint32[]stringGet combination for operation
LeftTileCountNoneintRemaining tile count
CanIppatsuNone[]boolWhether each player can perform Ippatsu
GlobalLeftTileNone[]stringGlobal discard pool
RiichiAtNone[]intPosition of Riichi in global discard pool, -1 if not declared
LevelNonestringPlayer level
LevelScoreNoneuint32Player level score
IsInSyncGameNoneboolWhether this game is a reconnection game
MeldsNone[][][]stringMelds of each player
RoundEndNone*RoundEndInformation on round end