There are two ways to overcome this problem. One is to use a kind of electric current that periodically reverses direction, which is known as an alternating current (AC). In the kind of small, battery-powered motors we use around the home, a better solution is to add a component called a commutator to the ends of the coil. (Do not worry about the meaningless technical name: this slightly old-fashioned word "commutation" is a bit like the word "commute". It simply means to change back and forth in the same way that commute means to travel back and forth.) In its simplest form, the commutator is a metal ring divided into two separate halves and its job is to reverse the electric current in the coil each time the coil rotates through half a turn. One end of the coil is attached to each half of the commutator. The electric current from the battery connects to the motor electric terminals. These feed electric power into the commutator through a pair of loose connectors called brushes, made either from pieces of graphite (soft carbon similar to pencil "lead") or thin lengths of springy metal, which (as the name suggests) "brush" against the commutator. With the commutator in place, when electricity flows through the circuit, the coil will rotate continually in the same direction.
Shield drain wire must be spliced only to mating shield drain wires and not grounded at the junction box. Feedback shields must be passed through pin for pin. Separate junction boxes for power and feedback are required.
The power of simple is manifested in that others were able to build from the foundation Einstein identified and defined. They were able to accomplish things they most likely could not have otherwise. We also have experienced this phenomenon. Consider Ohm law. Georg Ohm did the hard work and broke down the complex to a simple law. We use the principles contained in that law as a starting point to understand the complexities of electricity and circuit dynamics.
The colors or numbers themselves are often a clue, but they alone may not provide sufficient information. There is always the trial and error method, but I do not recommend that because of the potential for destructive results. Instead, the Motor Doctors suggestion is to equip yourself with an ohmeter (don nott settle for just a continuity tester) and learn to perform a few simple tests with it.