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

Minimal Framework

package main

import (
	"github.com/moxcomic/lq"
)

func onLogin() {}

func onRoomGameStart() {}

func onMatchGameStart() {}

func onNewRound() {}

func onRoundEnd() {}

func onPlayerLeaving(seat int) {}

func onExecute(result *lq.NotifyAIResult, risk []float64, rating, matches, fivePer, tenPer float64) {}

func onGameEnd() {}

func onServerDisconnect() {}

This framework includes a minimal game logic setup, containing only some basic events. You can modify and extend it according to your needs.

Prev
Basic Knowledge