Algorithm for checking hand score works