More code removal
This commit is contained in:
parent
5a3668a12e
commit
4e745f20f7
@ -14,14 +14,6 @@ export class Point implements PointInterface{
|
|||||||
this.y = y;
|
this.y = y;
|
||||||
this.direction = direction;
|
this.direction = direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
toJson(){
|
|
||||||
return {
|
|
||||||
x : this.x,
|
|
||||||
y: this.y,
|
|
||||||
direction: this.direction
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class MessageUserPosition extends Message{
|
export class MessageUserPosition extends Message{
|
||||||
@ -31,14 +23,4 @@ export class MessageUserPosition extends Message{
|
|||||||
super(message);
|
super(message);
|
||||||
this.position = new Point(message.position.x, message.position.y, message.position.direction);
|
this.position = new Point(message.position.x, message.position.y, message.position.direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
toString() {
|
|
||||||
return JSON.stringify(
|
|
||||||
Object.assign(
|
|
||||||
super.toJson(),
|
|
||||||
{
|
|
||||||
position: this.position.toJson()
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -2,5 +2,4 @@ export interface PointInterface {
|
|||||||
x: number;
|
x: number;
|
||||||
y: number;
|
y: number;
|
||||||
direction: string;
|
direction: string;
|
||||||
toJson() : object;
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user