Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Vehicle2010 extends Vehicle
- {
- void moveUpperRight()
- {
- x += 1;
- y += 1;
- }
- void moveUpperLeft()
- {
- x -= 1;
- y += 1;
- }
- void moveLowerRight()
- {
- x += 1;
- y -= 1;
- }
- void moveLowerLeft()
- {
- x -= 1;
- y -= 1;
- }
- public Boolean equals(Vehicle v)
- {
- if (x == v.x && y == v.y )
- {
- return true;
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement