Changed the move piece method to be more universal