Skip to content

Instantly share code, notes, and snippets.

@cazala
Created July 25, 2018 15:16
Show Gist options
  • Save cazala/705acfe6619498d5183813b078819b4e to your computer and use it in GitHub Desktop.
Save cazala/705acfe6619498d5183813b078819b4e to your computer and use it in GitHub Desktop.
// src/modules/match/actions.js
export const REGISTER_PLAYER = 'chess/match/register_player'
export const UNREGISTER_PLAYER = 'chess/match/unregister_player'
export const CHECKMATE = 'chess/match/checkmate'
export const registerPlayer = (playerId, isWhite) => ({
type: REGISTER_PLAYER,
playerId,
isWhite
})
export const unregisterPlayer = playerId => ({
type: UNREGISTER_PLAYER,
playerId
})
export const checkmate = () => ({
type: CHECKMATE
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment