Refactor MiniMax with threads and use of copy of the board