Coded Minimax Agent not working properly