MD5 hash function for current board state.  legal_moves function can now take a piece argument and return the legal moves for just that piece type.