parent
21cc7ecb2c
commit
423e487e14
@ -1,6 +1,6 @@
|
||||
import { io } from "socket.io-client";
|
||||
|
||||
|
||||
const socket = io("http://localhost:3002");
|
||||
const socket = io("http://172.20.10.4:3002");
|
||||
|
||||
export {socket}
|
@ -1,18 +0,0 @@
|
||||
import Player from "./Player";
|
||||
|
||||
class Human extends Player{
|
||||
|
||||
constructor(id: string, name: string){
|
||||
super(id, name)
|
||||
}
|
||||
|
||||
toJson() {
|
||||
return {
|
||||
type: "Human",
|
||||
id: this.id,
|
||||
name: this.name,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default Human
|
@ -0,0 +1,25 @@
|
||||
import Player from "./Player";
|
||||
|
||||
class User extends Player{
|
||||
|
||||
public soloStats: any
|
||||
public onlineStats: any
|
||||
|
||||
constructor(id: string, name: string, profilePicture: string, soloStats: any, onlineStats: any){
|
||||
super(id, name, profilePicture)
|
||||
this.soloStats=soloStats
|
||||
this.onlineStats=onlineStats
|
||||
}
|
||||
|
||||
toJson() {
|
||||
return {
|
||||
type: "User",
|
||||
id: this.id,
|
||||
pseudo: this.pseudo,
|
||||
soloStats: this.soloStats,
|
||||
onlineStats: this.onlineStats
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default User
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue