Created a hashing function for BoardState.  Added a HashMap to stop from
entering infinite loops.