Added minimax class and moved functions from tree class to minimax class.