From 4e745f20f7143bccee3d1f4538a2f14498dc4d31 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20N=C3=A9grier?= Date: Fri, 15 May 2020 22:08:53 +0200 Subject: [PATCH] More code removal --- .../src/Model/Websocket/MessageUserPosition.ts | 18 ------------------ back/src/Model/Websocket/PointInterface.ts | 3 +-- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/back/src/Model/Websocket/MessageUserPosition.ts b/back/src/Model/Websocket/MessageUserPosition.ts index 1b53462..4f27c26 100644 --- a/back/src/Model/Websocket/MessageUserPosition.ts +++ b/back/src/Model/Websocket/MessageUserPosition.ts @@ -14,14 +14,6 @@ export class Point implements PointInterface{ this.y = y; this.direction = direction; } - - toJson(){ - return { - x : this.x, - y: this.y, - direction: this.direction - } - } } export class MessageUserPosition extends Message{ @@ -31,14 +23,4 @@ export class MessageUserPosition extends Message{ super(message); 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() - }) - ); - } } diff --git a/back/src/Model/Websocket/PointInterface.ts b/back/src/Model/Websocket/PointInterface.ts index 7b464a5..9243acb 100644 --- a/back/src/Model/Websocket/PointInterface.ts +++ b/back/src/Model/Websocket/PointInterface.ts @@ -2,5 +2,4 @@ export interface PointInterface { x: number; y: number; direction: string; - toJson() : object; -} \ No newline at end of file +} -- 2.25.1