No, you don’t have to slam the eggs on the floor to find out
You’ve got spin the eggs to find out. A hard-boiled egg will spin freely (almost like a top) since the inside is also solid. A raw egg, on the other hand, will not spin that well since the inside is all runny and gooey.