Skip to content

Commit

Permalink
Client: Remove PlayLocal components
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Apr 16, 2021
1 parent 7088329 commit 798b5dd
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 298 deletions.
206 changes: 0 additions & 206 deletions games-vue-client/src/components/PlayLocalGame.vue

This file was deleted.

55 changes: 0 additions & 55 deletions games-vue-client/src/components/PlayLocalGameMenu.vue

This file was deleted.

37 changes: 0 additions & 37 deletions games-vue-client/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import Vue from "vue";
import Router from "vue-router";
import StartScreen from "@/components/StartScreen";
import TestScreen from "@/components/TestScreen";
import PlayLocalGame from "@/components/PlayLocalGame";
import PlayLocalGameMenu from "@/components/PlayLocalGameMenu";
import StatsScreen from "@/components/stats/StatsScreen";
import LobbyCompactList from "@/components/lobby/LobbyCompactList";
import TVScreen from "@/components/TVScreen";
Expand Down Expand Up @@ -90,41 +88,6 @@ export default new Router({
name: "LobbyCompactList",
component: LobbyCompactList,
},
{
path: "/local",
name: "LocalPlayMenu",
component: PlayLocalGameMenu,
props: route => ({
gameInfo: { gameType: route.query.gameType },
showRules: true
})
},
{
path: "/local/:gameType",
name: "LocalPlay",
component: PlayLocalGame,
props: route => {
let playerCount = 2;
let game = supportedGames.games[route.params.gameType];
if (game.dsl && game.dsl !== true) {
let setup = new supportedGames.gamejs.net.zomis.games.dsl.impl.GameSetupImpl(game.dsl)
let min = setup.playersCount.first
let max = setup.playersCount.last
playerCount = min + Math.floor(Math.random() * (max - min + 1));
console.log(`Random from ${min} to ${max} = ${playerCount}`)
}
let players = new Array(playerCount).fill(0).map((_, index) => index).map(i => ({
index: i,
id: `local:00000000-0000-0000-0000-00000000000` + i.toString(16),
name: "Player " + (i + 1),
picture: `https://www.gravatar.com/avatar/${md5(i)}?s=128&d=identicon`
}));
return {
gameInfo: { gameType: route.params.gameType, players: players },
showRules: true
}
}
},
{
path: "/tv",
name: "TVScreen",
Expand Down

0 comments on commit 798b5dd

Please sign in to comment.