game

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package game pits two engines against each other.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, input Input) (*chess.Game, error)

Run plays a game.

func RunWithLive

func RunWithLive(ctx context.Context, input Input, static fs.FS, port int) (*chess.Game, error)

RunWithLive plays a game and broadcast it to a live view.

Types

type Input

type Input struct {
	WhiteEngine  string
	BlackEngine  string
	WhiteOptions map[string]string
	BlackOptions map[string]string
	Time         time.Duration
}

Input is a game play input.

Jump to

Keyboard shortcuts

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