Morgan Stanley Interview Question

I had to write a chess player program.