Apologies beforehand if this is a common-knowledge thing, I wasn't able to find anything about it online.
I want to be able to swap the direction a motor runs based on inputs from a sensor. The motor I have seems to swap directions fine when you change the current flow direction (the starter kit doesn't actually say what model the motor is, so I have no idea if this is damaging in the long run, if so please let me know, I've attached a picture of the motor). After fiddling around on the breadboard, it looks like four transistors is about as simple a circuit as I can get (drawing of circuit attached). Is there a better/simpler way to do this? I feel like there has to be a component for this that I just don't know about, that doesn't take up like half of the breadboard.