From fb558d25188821339b101c6f195c6b3883e4ed02 Mon Sep 17 00:00:00 2001 From: meriadec Date: Fri, 9 Oct 2015 11:33:46 +0200 Subject: [PATCH] fix(core): fixing warnings and adding a nice feature --- actions/game.js | 4 ---- components/game/index.js | 2 -- stores/GameStore.js | 6 ------ 3 files changed, 12 deletions(-) diff --git a/actions/game.js b/actions/game.js index 1b6b412..762d830 100644 --- a/actions/game.js +++ b/actions/game.js @@ -24,10 +24,6 @@ export function reset (context) { context.dispatch('RESET_GAME'); } -export function destroyGame (context) { - context.dispatch('DESTROY_GAME'); -} - export function tick (context) { context.dispatch('GAME_TICK'); } diff --git a/components/game/index.js b/components/game/index.js index e980b50..1417794 100644 --- a/components/game/index.js +++ b/components/game/index.js @@ -14,7 +14,6 @@ import GameStats from './GameStats'; // actions import { - destroyGame, tick, beginTest, updateWord, @@ -67,7 +66,6 @@ class Game extends React.Component { if (this._hasGameTick) { clearInterval(this._gameTick); } - this.props.context.executeAction(destroyGame); } updateStats () { diff --git a/stores/GameStore.js b/stores/GameStore.js index d538edd..6efd688 100644 --- a/stores/GameStore.js +++ b/stores/GameStore.js @@ -144,11 +144,6 @@ class GameStore extends BaseStore { this.emitChange(); } - handleDestroyGame () { - this.init(); - this.emitChange(); - } - handleGameTick () { this.calcStats(); this.emitChange(); @@ -169,7 +164,6 @@ class GameStore extends BaseStore { GameStore.storeName = 'GameStore'; GameStore.handlers = { - DESTROY_GAME: 'handleDestroyGame', RANDOM_TEXT_LOAD: 'handleRandomTextLoad', RANDOM_TEXT_LOADED: 'handleRandomTextLoaded', GAME_TICK: 'handleGameTick',