cli

package
v0.0.0-...-e8f802b Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearTerm

func ClearTerm()

func GetUserInt

func GetUserInt(low int, high int) int

GetUserInt reads input from a scanner and returns the result if it is an int in the range low <= x <= high. Prompts the user to attempt again if input cannot be intepreted as an int in given range.

func PrintGame

func PrintGame(board *[8][8]Tile, currentPlayer Tile)

func RunGame

func RunGame()

Types

type Move

type Move = othello.Move

func GetMove

func GetMove(legalMoves []Move) (Move, bool)

GetMove prints out a list of legal moves and allows the current player to select from one of them, returns the selected legal move.

type Tile

type Tile = othello.Tile

Jump to

Keyboard shortcuts

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