1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00

Hound cleanups

This commit is contained in:
Daniel Barber 2018-03-12 11:28:21 -04:00
parent 1c6ff47d8b
commit e23980537b
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
3 changed files with 3 additions and 4 deletions

View File

@ -11,8 +11,7 @@ import { Provider } from "react-redux";
import Channel from "./services/channel";
import chessBoardReducer from "./reducers/chess-board";
import { setPlayer, setGame, setGameId } from "./store/actions";
import ChessBoard from "./components/chess-board";
import { setGameId } from "./store/actions";
const store = createStore(chessBoardReducer);

View File

@ -23,7 +23,7 @@ class ChessBoardSquare extends React.Component {
sendMove(gameId, {
from: selectedSquare,
to: this.squareCoords,
})
});
} else if (selectedSquare != null) {
store.dispatch(selectPiece(null));
} else if (this.playerCanSelectPiece(player, piece)) {

View File

@ -21,7 +21,7 @@ class Channel {
this.channel.on("game:update", data => {
if (data.player != undefined) {
this.store.dispatch(setPlayer(data.player));
};
}
this.store.dispatch(setGame(data));
});
}