Finished implementing the movement rules