server

package
v0.0.0-...-9a7e3c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func FhlInit

func FhlInit() (*fhl.FHL, error)

func GetTopic

func GetTopic(f *fhl.FHL) func(*gin.Context)

func RunGin

func RunGin(f *fhl.FHL)

func UpAnswer

func UpAnswer(f *fhl.FHL) func(*gin.Context)

Types

type Answer

type Answer struct {
	ID   string `json:"id"`
	Text string `json:"text"`
}

type AnswerResq

type AnswerResq struct {
	TopicResp        //题目
	Text      string `json:"text"` //ans
	//结合mod使用
	// "update": "",  // A: 没有更新
	// "update": "1",   // B: 表示接下来轮到的玩家需要飞的字
	// "update": "4",   // C: 用到的可消除字
	// "update": "0,4", // D: 左边和右边用到的字
	Update      string              `json:"update"`
	HistorySet  []string            `json:"-"`
	History     []fhl.CorrectAnswer `json:"-"`
	HistoryText []string            `json:"history"`

	NextOne fhl.Side `json:"user"`   //下一个该谁回答,默认0开始,也可以根据history%2推算
	Reason  string   `json:"reason"` //游戏消息
}

type RespCode

type RespCode struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    any    `json:"data"`
}

type Topic

type Topic struct {
	ModType string `json:"modtype"`
	Size    int    `json:"size"`
	ID      string `json:"id"`
}

type TopicResp

type TopicResp struct {
	ModType       string `json:"modtype"`
	Size          int    `json:"size"`
	ID            string `json:"id"`
	SubjectString string `json:"subjectstring"`
	fhl.Subject   `json:"-"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL