Update Rule.java

Created the shiftHorizontal method.