Implemented alpha-beta pruning