We develop a reconfigurable legged robot, named Snapbot, to emulate configuration changes and various styles of legged locomotion. The body of Snapbot houses a microcontroller and a battery for untethered operation. The body also contains connections for communication and power to the modular legs. The legs can be attached to and detached from the body using magnetic mechanical couplings. In the center of this coupling, there is a multi-pin spring-loaded electrical connector that distributes power and transmits data between the controller and leg actuators. The locomotion algorithm is implemented on the microcontroller. The algorithm enables Snapbot to locomote in various configurations with one to six legs by recognizing configuration changes and selecting the locomotion method according to the current configuration. Snapbot will be utilized for further research on legged locomotion.