Fixed a 'maximum stack size exceeded' error occurring when training.

Also, now checking for invalid moves when training, resulting in either:-
- moving a player off the board
- moving a player in the direction they are already moving