Update main.cpp

add function can_move
it can test whether the column or row can move with the direction

this function can displace function row_full and column_full