[RESOLVIDO]Como que eu instancio o objeto Mars dentro da classe Rover? Pois, está me retornando o seguinte erro: "Mars is not defined"
class Rover{
constructor(orderedX,orderedY,orientation,toMove){
this.orderedX = orderedX;
this.orderedY = orderedY;
this.orientation = orientation;
this.toMove = toMove;
this.marsZise = new Mars(5,5);
this.running();
}
class Mars{
constructor(sizeX,sizeY){
this._orderedlengthX = sizeX;
this._orderedlengthY = sizeY;
}
typescript
? se sim, apenas faça:Rover extends Mars