fn random_action(board) { let symb = rand_symb(); let pos = rand_int(0, 10); let action = Action(symb, pos); while !board.can_play(action) { let symb = rand_symb(); let pos = rand_int(0, 10); action = Action(symb, pos); } return action } fn step_min(board) { random_action(board) } fn step_max(board) { random_action(board) }