Documentation ¶
Overview ¶
Package utils, implements utility functions used by game TicTacToe.
Index ¶
Constants ¶
View Source
const (
Blank string = "---------" // Blank board state
)
Variables ¶
View Source
var WinningCombo = [][]int{
{0, 1, 2},
{3, 4, 5},
{6, 7, 8},
{0, 3, 6},
{1, 4, 7},
{2, 5, 8},
{0, 4, 8},
{2, 4, 6},
}
Functions ¶
func GenerateUUID ¶
GenerateUUID, uses google/uuid package to generate a UUID.
func GetGameStatus ¶
GetGameStatus, takes board as input and returns game status - Running, Draw, XWins or OWins.
func ValidateUserMove ¶
ValidateUserMove, validates User move
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.