omgwords

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: AGPL-3.0 Imports: 23 Imported by: 0

README

This pkg is the foundation for a future new service - "omgwords-svc" - which handles omgwords gameplay. It is eventually meant to replace the pkg/gameplay module. It will use the pkg/cwgame package to implement the rules of the game.

omgwords-svc will do everything related to the gameplay that is not handled by the core rules pkg (cwgame).

For example:

  • routing messages back and forth from cwgame to the rest of the app / message bus
  • annotated game api
  • gamedocument store

Documentation

Index

Constants

View Source
const GamesLimit = 50

Variables

This section is empty.

Functions

func AnnotatedChannelName

func AnnotatedChannelName(gameID string) string

func MergeGameDocuments

func MergeGameDocuments(dst *ipc.GameDocument, src *ipc.GameDocument) error

MergeGameDocuments merges the src document into the dst document. We don't use proto.Merge directly since we want to replace most arrays if they're specified in both documents.

Types

type OMGWordsService

type OMGWordsService struct {
	// contains filtered or unexported fields
}

func (*OMGWordsService) GetCGP

func (*OMGWordsService) GetGameDocument

func (*OMGWordsService) ImportGCG

func (*OMGWordsService) PatchGameDocument

PatchGameDocument merges the requested game document into the existing one. For now, we just use this to update various metadata (like description, player names, etc). Disallow updating game structures directly until the front end can implement GameDocument on its own.

func (*OMGWordsService) ReplaceGameDocument

UpdateGameDocument updates a game document for an annotated game. It doesn't really have meaning outside annotated games, as players should instead use an individual event update call.

func (*OMGWordsService) SendGameEvent

func (*OMGWordsService) SetBroadcastGamePrivacy

func (*OMGWordsService) SetEventChannel

func (gs *OMGWordsService) SetEventChannel(c chan *entity.EventWrapper)

func (*OMGWordsService) SetRacks

SetRacks sets the player racks per user. It checks to make sure that the rack can be set before actually setting it.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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