import type { Player } from "@runox-game/game-engine/lib/models/player.model" ; import { from , Observable } from "rxjs" ; import { first } from 'rxjs/operators' ; import { GameEngineService } from "./game-engine" ; export class FirebaseEngineService { private gameEngine : GameEngineService ; constructor ( ) { this . gameEngine = new GameEngineService ( ) ; } createRoom ( roomName ) { return ; } joinUser ( user , roomName ) { this . gameEngine . joinUser ( user ) ; let _state = this . gameEngine . game . gameStateAsJSON ; _state = JSON . parse ( JSON . stringify ( _state ) ) ; const room = Object . assign ( { } , { ... _state , start : false , winner : null , name : roomName } ) ; return ; } } export default FirebaseEngineService ;