add alpha-beta function for testing

algorithm copied from chess programming wiki