Factor out can_move_to() from go()
Replace Knight with a function
Replace King class with a function
Replace Pawn with a function