Browse Source

Corrects warnings

Nikatlas 6 years ago
parent
commit
2ebcd69d47

+ 1 - 0
debug.log

@@ -5,3 +5,4 @@
 [1002/133139.195:ERROR:crash_report_database_win.cc(428)] unexpected header
 [1002/133205.655:ERROR:crash_report_database_win.cc(428)] unexpected header
 [1002/134049.134:ERROR:crash_report_database_win.cc(428)] unexpected header
+[1002/143741.449:ERROR:crash_report_database_win.cc(428)] unexpected header

+ 2 - 1
src/Game/game/machine/GameMoves.js

@@ -35,7 +35,8 @@ class PlaceMove extends GameMove {
             console.log(board);
             
 
-            throw ('Tried to place a card on occupied holder!');
+            let err = { msg: 'Tried to place a card on occupied holder!' };
+            throw err;
         }
         board.putCard(this.card, this.position, this.player);
     }

+ 4 - 4
src/Game/services/SocketService.js

@@ -1,13 +1,13 @@
-import Net from './Net.js';
+// import Net from './Net.js';
 import openSocket from 'socket.io-client';
 
 import UserService from './UserService';
 
 class SocketService {
 
-    constructor() {
-        // check persistence - reconnect 
-    }
+    // constructor() {
+    //     // check persistence - reconnect 
+    // }
 
     openSocket(channel) {
         if(this.socket)

+ 1 - 1
src/Game/views/buildings/Deck.js

@@ -5,7 +5,7 @@ import GuiableContainer from '../../../helpers/Guiable';
 // import Deck from '../../assets/deck';
 import CardHolder from '../base/CardHolder';
 
-import GameService from '../../services/GameService';
+// import GameService from '../../services/GameService';
 
 import Card from '../base/Card';
 

+ 4 - 4
src/Game/views/buildings/Menu.js

@@ -1,5 +1,5 @@
-import * as PIXI from 'pixi.js';
-import dragAndDrop from '../../../helpers/dragAndDrop';
+// import * as PIXI from 'pixi.js';
+// import dragAndDrop from '../../../helpers/dragAndDrop';
 import GuiableContainer from '../../../helpers/Guiable';
 import Injector from '../../services/Injector';
 
@@ -11,8 +11,8 @@ import Button from '../misc/Button';
 import SocketService from '../../services/SocketService';
 import GameService from '../../services/GameService';
 
-const BlueURL = '/files/assets/cards/frame_blue.png';
-const BlueImage = PIXI.Texture.fromImage(BlueURL);
+// const BlueURL = '/files/assets/cards/frame_blue.png';
+// const BlueImage = PIXI.Texture.fromImage(BlueURL);
 
 class Menu extends GuiableContainer{
     constructor(props) {

+ 2 - 2
src/Game/views/demo/Login.js

@@ -1,5 +1,5 @@
 import * as PIXI from 'pixi.js';
-import Injector from '../../services/Injector';
+// import Injector from '../../services/Injector';
 
 import UserService from '../../services/UserService';
 
@@ -10,7 +10,7 @@ import Button from '../misc/Button';
 class Login extends PIXI.Container{
     constructor(props) {
         super();
-        let {GameLayer, Gui} = props;
+        let {GameLayer} = props;
 
         let email = new TextInput({GameLayer, width: 250});
         this.addChild(email);

+ 4 - 4
src/Game/views/demo/Menu.js

@@ -1,16 +1,16 @@
 import * as PIXI from 'pixi.js';
-import Injector from '../../services/Injector';
+// import Injector from '../../services/Injector';
 
 import UserService from '../../services/UserService';
 
-import TextInput from '../misc/TextInput';
+// import TextInput from '../misc/TextInput';
 import Text from '../misc/Text';
-import Button from '../misc/Button';
+// import Button from '../misc/Button';
 
 class Menu extends PIXI.Container{
     constructor(props) {
         super();
-        let {GameLayer, Gui} = props;
+        let {GameLayer} = props;
 
         let Play = new Text({GameLayer, width: 250});
         this.addChild(Play);

+ 5 - 5
src/Game/views/demo/Navigation.js

@@ -1,11 +1,11 @@
 import * as PIXI from 'pixi.js';
 import Injector from '../../services/Injector';
 
-import UserService from '../../services/UserService';
+// import UserService from '../../services/UserService';
 
-import TextInput from '../misc/TextInput';
-import Text from '../misc/Text';
-import Button from '../misc/Button';
+// import TextInput from '../misc/TextInput';
+// import Text from '../misc/Text';
+// import Button from '../misc/Button';
 
 import Login from './Login';
 import BoardPlay from './Board';
@@ -16,7 +16,7 @@ class Navigation extends PIXI.Container{
     constructor(props) {
         super();
         this.props = props;
-        let {GameLayer, Gui} = props;
+        // let {GameLayer} = props;
 
         Injector.saveAs('Navigator',this);
         this.routes = {

+ 1 - 1
src/Playground/Loader.js

@@ -26,7 +26,7 @@ class Loader extends PIXI.Container{
 
         document.onkeydown = (e) => {
           var tabKey = 9;
-          if(e.keyCode == tabKey) {
+          if(e.keyCode === tabKey) {
             e.preventDefault();
             return false;
           }