rps

package
v0.0.0-...-db24ddd Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteGame

func DeleteGame(uuid string, c cache.Cache)

func DeleteRps

func DeleteRps(playerRps RPS, chanId string, c cache.Cache)

func Playing

func Playing(player RPS) bool

Types

type RPS

type RPS struct {
	RpsPlaying string `json:"rps-playing"`
	Rps        string `json:"rps"`
	Name       string `json:"name"`
}

func FindApponent

func FindApponent(event RpsBotGame, forPlayer RPS, chanId string) (RPS, error)

func GetPlayer

func GetPlayer(player users.User, chanId string, c cache.Cache) (RPS, error)

func GetWinner

func GetWinner(player RPS, opponent RPS) ([]RPS, bool)

func UpdateRps

func UpdateRps(playerRps RPS, chanId string, c cache.Cache) (RPS, error)

type RpsBotGame

type RpsBotGame struct {
	ReplyChannel    *model.Channel
	ResponseChannel chan comms.Response
	Cache           cache.Cache
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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