Ground work and first function for checking the hand value