Documentation ¶
Overview ¶
Package xwordgame 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 ¶
View Source
const (
LeaveFile = "leave_values_011019_v5.csv"
)
Variables ¶
View Source
var ( CVCCounter *expvar.Int IsPlaying *expvar.Int )
View Source
var AuthorizationKey = os.Getenv("AUTH_KEY")
View Source
var GaddagDir = os.Getenv("GADDAG_DIR")
Functions ¶
Types ¶
type CompVCompService ¶
type CompVCompService struct{}
func (*CompVCompService) Play ¶
func (c *CompVCompService) Play(r *http.Request, args *CompVCompServiceArgs, reply *CompVCompServiceReply) error
type CompVCompServiceArgs ¶
type CompVCompServiceArgs struct { NumGames int `json:"numGames"` NumCores int `json:"numCores"` Computer1Engine string `json:"comp1Engine"` Computer2Engine string `json:"comp2Engine"` OutputFile string `json:"outputFile"` LexiconName string `json:"lexiconName"` AuthToken string `json:"authToken"` }
type CompVCompServiceReply ¶
type CompVCompServiceReply struct {
Message string `json:"message"`
}
type Player ¶
type Player struct {
// contains filtered or unexported fields
}
A Player plays crossword game.
type XWordGame ¶
type XWordGame struct {
// contains filtered or unexported fields
}
XWordGame encapsulates the various components of a crossword game.
func (*XWordGame) CompVsCompStatic ¶
func (game *XWordGame) CompVsCompStatic(gd *gaddag.SimpleGaddag)
CompVsCompStatic plays out a game to the end using best static turns.
func (*XWordGame) Init ¶
func (game *XWordGame) Init(gd *gaddag.SimpleGaddag)
Init initializes the crossword game and seeds the random number generator.
func (*XWordGame) PlayBestStaticTurn ¶
PlayBestStaticTurn generates the best static move for the player and plays it on the board.
Click to show internal directories.
Click to hide internal directories.