Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Vehicle {
- constructor(type, model, parts, fuel) {
- this.type = type;
- this.model = model;
- this.parts = parts;
- this.fuel = fuel;
- this.parts.quality = this.parts.engine * this.parts.power;
- }
- drive(x) {
- this.fuel -= x;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement