Of course sometimes the novels serve to put right continuity errors in the TV show.
The 2nd Doctor was apparently exiled to Earth and forced to regenerate at the end of The War Games by the Time Lords, a race not mentioned until this episode. The regeneration was never shown on screen. Meanwhile his companions were returned to their rightful place in time and space and had their memories of their travels with the Doctor wiped. Also the 2nd Doctor was never able to control his TARDIS.
However come The Five Doctors the 2nd Doctor was able to travel to a UNIT convention with his TARDIS and was aware that Jamie had had his mind wiped. Neither should have been possible. Again in the The Two Doctors the 2nd Doctor is on a mission from the Time Lords, who were not mentioned and he was scared of until the event of The War Games and again was able to control his TARDIS, this time even remotely.
Therefore a theory was born that between the events of The War Games and Spearhead From Space the Doctor was recruited by the Time Lords to work for them doing deeds they were unable to do themselves, or not wished to be associated with. Part of the deal involved them granting the Doctor control of his TARDIS and use of whatever companions he wished. Once the deal was done, his mind was wiped and his sentence was enforced. The 3rd Doctor even suffers memory lapses during Spearhead From Space. This theory is known as “series 6B”.
Terrance Dicks has written 2 novels which make reference to, or are set in this time frame. “Players” was the first and just features a flashback scene. Whereas “World Game” bridges the gap totally between The War Games and The Two Doctors and features the vast majority of the series 6B theory.