Check Function Complete and fixed allmoves bug

Made Check function and FindEnemyKing Functions.
FindEnemyKing function should run at the beginning of the heuristic to
avoid repeated calls to it .Also saw that the allmoves function was
starting at the wrong row and I fixed it.... dodged a bullet there! The