Optiver interview question

Chess piece how to move