Changed State to a sealed abstract class and changed setVelocity to return a Boolean instead of an Int