[ Injuries ] Open Question : How do I know if my foot is broken?

Today I was playing soccer in bare feet and person on the opposing team stepped on the top of my foot with their cleats. now its rather swollen with a red line going across my foot. im not able to bend my ring or pinky toe. should I get x rays?