automatic

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: GPL-3.0 Imports: 19 Imported by: 1

Documentation

Overview

Package automatic contains all the logic for the actual gameplay of Crossword Game, which, as we said before, features all sorts of things like wingos and blonks.

Index

Constants

This section is empty.

Variables

View Source
var (
	CVCCounter *expvar.Int
	IsPlaying  *expvar.Int
)
View Source
var LexiconPath = os.Getenv("LEXICON_PATH")

Functions

func StartCompVCompStaticGames

func StartCompVCompStaticGames(ctx context.Context, cfg *config.Config,
	gd *gaddag.SimpleGaddag, numGames int, threads int, outputFilename string) error

Types

type GameRunner

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

GameRunner is the master struct here for the automatic game logic.

func (*GameRunner) CompVsCompStatic

func (r *GameRunner) CompVsCompStatic(gd *gaddag.SimpleGaddag)

CompVsCompStatic plays out a game to the end using best static turns.

func (*GameRunner) Init

func (r *GameRunner) Init(gd *gaddag.SimpleGaddag)

Init initializes the runner

func (*GameRunner) PlayBestStaticTurn

func (r *GameRunner) PlayBestStaticTurn(playerID int)

PlayBestStaticTurn generates the best static move for the player and plays it on the board.

func (*GameRunner) StartGame

func (r *GameRunner) StartGame()

type Job

type Job struct{}

type Server

type Server struct{ Config *config.Config }

func (*Server) Play

func (s *Server) Play(ctx context.Context, args *pb.PlayRequest) (*pb.PlayResponse, error)

Jump to

Keyboard shortcuts

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