1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00
chess/assets/js/store/actions.js
Dan Barber 43a4299478
Upgrade to Phoenix 1.3
I've also moved everything around to match the new Phoenix 1.3 directory
structure.
2018-01-12 16:47:26 -05:00

25 lines
398 B
JavaScript

const SET_BOARD = "SET_BOARD";
const SET_GAME_ID = "SET_GAME_ID";
const SELECT_PIECE = "SELECT_PIECE";
export const setBoard = (board) => {
return {
type: SET_BOARD,
board: board
}
}
export const setGameId = (gameId) => {
return {
type: SET_GAME_ID,
gameId: gameId
}
}
export const selectPiece = (coords) => {
return {
type: SELECT_PIECE,
coords: coords
};
}