func Create(id string, font *giu.FontInfo) *Game {
	result := &Game{
		id:        id,
		boardFont: font,
		players:   ttgplayer.Create(ttgplayer.PlayerPerson, nil, ttgplayer.PlayerPC, nil),
		winner:    ttgletter.LetterNone,
		gameEnd:   false,
	}

	// nolint:gomnd // test
	result.board = ttgboard.NewBoard(3, 3, 3)
	result.players.OnContinue(func() {
		if result.board.IsBoardFull() {
			result.gameEnd = true
		} else if ok, c := result.board.IsWinner(result.board.ChainLength(), ttgletter.LetterX); ok {
			result.gameEnd = true
			result.winner = ttgletter.LetterX
			result.winningCombo = c
		} else if ok, c := result.board.IsWinner(result.board.ChainLength(), ttgletter.LetterO); ok {
			result.gameEnd = true
			result.winner = ttgletter.LetterO
			result.winningCombo = c
		}
	})

	return result
}
// Create creates a new game
Create creates a new game
// Create creates a new game
func Create(id string, font *giu.FontInfo) *Game {
	result := &Game{
		id:        id,
		boardFont: font,
		players:   ttgplayer.Create(ttgplayer.PlayerPerson, nil, ttgplayer.PlayerPC, nil),
		winner:    ttgletter.LetterNone,
		gameEnd:   false,
	}
	result.board = ttgboard.NewBoard(3, 3, 3)
	result.players.OnContinue(func() {
		if result.board.IsBoardFull() {
			result.gameEnd = true
		} else if ok, c := result.board.IsWinner(result.board.ChainLength(), ttgletter.LetterX); ok {
			result.gameEnd = true
			result.winner = ttgletter.LetterX
			result.winningCombo = c
		} else if ok, c := result.board.IsWinner(result.board.ChainLength(), ttgletter.LetterO); ok {
			result.gameEnd = true
			result.winner = ttgletter.LetterO
			result.winningCombo = c
		}
	})
	return result
}
func Create ( id string , font * giu . FontInfo ) * Game { result := & Game { id : id , boardFont : font , players : ttgplayer . Create ( ttgplayer . PlayerPerson , nil , ttgplayer . PlayerPC , nil ) , winner : ttgletter . LetterNone , gameEnd : false , } result . board = ttgboard . NewBoard ( 3 , 3 , 3 ) result . players . OnContinue ( func ( ) { if result . board . IsBoardFull ( ) { result . gameEnd = true } else if ok , c := result . board . IsWinner ( result . board . ChainLength ( ) , ttgletter . LetterX ) ; ok { result . gameEnd = true result . winner = ttgletter . LetterX result . winningCombo = c } else if ok , c := result . board . IsWinner ( result . board . ChainLength ( ) , ttgletter . LetterO ) ; ok { result . gameEnd = true result . winner = ttgletter . LetterO result . winningCombo = c } } ) return result }
Create creates a new game
Create creates a new game
// nolint:gomnd // test