import { Component, OnInit } from '@angular/core'; import { LauncherService } from '../services/launcher.service'; import { Game } from '../services/oxana.service'; @Component({ selector: 'app-games-bar', templateUrl: './games-bar.component.html', styleUrls: ['./games-bar.component.scss'] }) export class GamesBarComponent implements OnInit { constructor(private launcher: LauncherService) { } games!: Game[] // games: Game[] = [{ // name: 'str', // players: ['1', '2'] // }, // { // name: 'qwe', // players: ['6', '4'] // }] ngOnInit(): void { // let i = 0 // setInterval(() => { // this.games.push({name: `name-${++i}`, players: []}) // }, 100) this.games = this.launcher.GetGames() console.log("asdasd") console.log(this.games) } // removePlayerZero (item: Game) { // if (item.players.length == 0) return // item.players.splice(0, 1) // } }