Skip to content

Commit

Permalink
fix: trim unused declarations (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
Terkwood authored May 13, 2021
1 parent 2954f4b commit 3ffcac6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion browser/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bugout-browser",
"productName": "BUGOUT",
"version": "1.4.2-c",
"version": "1.4.2-d",
"description": "Graphical user interface for BUGOUT Go/Baduk/Weiqi",
"author": "Terkwood <[email protected]>",
"homepage": "https://github.com/Terkwood/BUGOUT",
Expand Down
6 changes: 2 additions & 4 deletions browser/src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ class App extends Component {
clickVertex(vertex, { button = 0 } = {}) {
this.closeDrawer();

let { gameTrees, gameIndex, gameCurrents, treePosition } = this.state;
let { gameTrees, gameIndex, treePosition } = this.state;
let tree = gameTrees[gameIndex];
let board = gametree.getBoard(tree, treePosition);

Expand Down Expand Up @@ -1175,7 +1175,7 @@ class App extends Component {
let { gameTrees, gameIndex } = this.state;
let { currentPlayer } = this.inferredState;
let tree = gameTrees[gameIndex];
let [color, opponent] = currentPlayer > 0 ? ["B", "W"] : ["W", "B"];
let color = currentPlayer > 0 ? "B" : "W";
let [playerIndex, otherIndex] = currentPlayer > 0 ? [0, 1] : [1, 0];
let playerSyncer = this.attachedEngineSyncers[playerIndex];
let otherSyncer = this.attachedEngineSyncers[otherIndex];
Expand Down Expand Up @@ -1288,8 +1288,6 @@ class App extends Component {
stopGeneratingMoves() {
if (!this.state.generatingMoves) return;

let t = i18n.context("app.engine");

this.setState({ generatingMoves: false });
}

Expand Down
2 changes: 1 addition & 1 deletion browser/src/modules/shims/gtp.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class WebSocketController extends EventEmitter {
});
sabaki.events.on(
"sync-server-ahead",
({ type, replyTo, playerUp, turn, moves }) => {
({ playerUp, moves }) => {
sabaki.generateMove();

let syncLastMove = moves[moves.length - 1];
Expand Down

0 comments on commit 3ffcac6

Please sign in to comment.