Added abstract algorithm so we can easily change between minimax and alphabeta