TicTacToe.Ai (tic_tac_toe v2.0.1) View Source

Function for finding the best next move using MinMax.

Link to this section Summary

Link to this section Functions

Link to this function

choose_next_position(game)

View Source

Specs

choose_next_position(TicTacToe.Game.t()) :: TicTacToe.Board.position()

Specs

playable_positions(TicTacToe.Game.t()) :: [TicTacToe.Board.position()]

Specs

score(TicTacToe.Game.t()) :: computer_score()
Link to this function

simulate_move(game, position)

View Source

Specs