Want to build a purely digital switch (solved)

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.

Psssst: google “h-bridge”

WattsThat:
Psssst: google “h-bridge”

Ha, how about that. Thanks!

Also do go with the times. Pass on the old, inefficient, bulky L293 and L298 ones.

Go instead for a more modern, efficient, small tb6612fng or similar CMOS based H-bridge. About the same price to boot, thanks to the less need of external components and no heat sink.