finishes the legalmove function except for where other pieces are blocking the path of the moving piece