Sped up minimax with memoization.
Added memoization to negamax.