Update main.cpp

add function can_move

description in google doc
Merge pull request #4 from fwpp/patch-4

Update main.cpp