handlers

package
v0.0.0-...-a1e6c29 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Zlib Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultErrorMsg = "💥 Tuk-Tuk hit a pothole."
View Source
const NoAnkhtionErrorMsg = "⚠️ No Ankhtion scheduled."
View Source
const NoPlayerErrorMsg = "⚠️ You haven't yet joined the ongoing game. Use `/aot join` first."
View Source
const NoWalletErrorMsg = "⚠️ You have no Tukens. Use `tuken mine` first."
View Source
const TukenMineCooldownHours = 4
View Source
const TukenMineMean int64 = 1200
View Source
const TukenMineStdDev int = 80

Variables

This section is empty.

Functions

This section is empty.

Types

type AOTCycle

type AOTCycle struct{}

func (AOTCycle) Handle

func (h AOTCycle) Handle(ctx context.Context, db *pgxpool.Conn, gid int64, uid int64) (re Reply, err error)

type AOTJoin

type AOTJoin struct{}

func (AOTJoin) Handle

func (h AOTJoin) Handle(ctx context.Context, db *pgxpool.Conn, gid int64, uid int64) (re Reply, err error)

type AOTStatus

type AOTStatus struct{}

func (AOTStatus) Handle

func (h AOTStatus) Handle(ctx context.Context, db *pgxpool.Conn, gid int64, uid int64) (re Reply, err error)

type AnkhtionBuy

type AnkhtionBuy struct{}

func (AnkhtionBuy) Handle

func (h AnkhtionBuy) Handle(ctx context.Context, db *pgxpool.Conn, gid int64, uid int64) (re Reply, err error)

type AnkhtionView

type AnkhtionView struct{}

func (AnkhtionView) Handle

func (h AnkhtionView) Handle(ctx context.Context, db *pgxpool.Conn, gid int64, uid int64) (re Reply, err error)

type BaccaratHand

type BaccaratHand struct {
	Cards []playingcard.PlayingCard
	Score int
}

func (*BaccaratHand) Deal

func (hand *BaccaratHand) Deal(card playingcard.PlayingCard)

type BanditGuard

type BanditGuard struct {
	Reactor  int16
	Spearmen int
	Archers  int
}

func (BanditGuard) Handle

func (h BanditGuard) Handle(ctx context.Context, db *pgxpool.Conn, gid int64, uid int64) (re Reply, err error)

type BanditHire

type BanditHire struct {
	Spearmen int
	Archers  int
}

func (BanditHire) Handle

func (h BanditHire) Handle(ctx context.Context, db *pgxpool.Conn, gid int64, uid int64) (re Reply, err error)

type BanditRaid

type BanditRaid struct {
	TargetUserID int64
	Reactor      int16
	Spearmen     int
	Archers      int
}

func (BanditRaid) Handle

func (h BanditRaid) Handle(ctx context.Context, db *pgxpool.Conn, gid int64, uid int64) (re Reply, err error)

type BanditSim

type BanditSim struct {
	AtkSpearmen int
	AtkArchers  int
	DefSpearmen int
	DefArchers  int
}

func (BanditSim) Handle

func (h BanditSim) Handle(gid int64, uid int64) (re Reply, err error)

type DBHandler

type DBHandler interface {
	Handle(ctx context.Context, db *pgxpool.Conn, gid int64, uid int64) (re Reply, err error)
}

type Handler

type Handler interface {
	Handle(gid int64, uid int64) (re Reply, err error)
}

type Reply

type Reply struct {
	PublicMsg  string
	PrivateMsg string
}

type Roll

type Roll struct {
	Sides int
	Count int
}

func (Roll) Handle

func (h Roll) Handle(gid int64, uid int64) (re Reply, err error)

type TukenMine

type TukenMine struct{}

func (TukenMine) Handle

func (h TukenMine) Handle(ctx context.Context, db *pgxpool.Conn, gid int64, uid int64) (re Reply, err error)

type TukkaratOutcome

type TukkaratOutcome int
const (
	TukkaratOutcomePassenger TukkaratOutcome = iota
	TukkaratOutcomeDriver
	TukkaratOutcomeTie
)

type TukkaratSolo

type TukkaratSolo struct {
	Tukens  int64
	Outcome TukkaratOutcome
}

func (TukkaratSolo) Handle

func (h TukkaratSolo) Handle(ctx context.Context, db *pgxpool.Conn, gid int64, uid int64) (re Reply, err error)

Jump to

Keyboard shortcuts

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