You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

43 lines
826 B

export const MUNCHER_ACTION = 'MUNCHER_ACTION';
export const LEFT = 'LEFT';
export const RIGHT = 'RIGHT';
export const UP = 'UP';
export const DOWN = 'DOWN';
export const MUNCH = 'MUNCH';
export const FREEZE = 'FREEZE';
export const UNFREEZE = 'UNFREEZE';
export const moveLeft = () => ({
type: MUNCHER_ACTION,
action: LEFT
});
export const moveRight = () => ({
type: MUNCHER_ACTION,
action: RIGHT
});
export const moveUp = () => ({
type: MUNCHER_ACTION,
action: UP
});
export const moveDown = () => ({
type: MUNCHER_ACTION,
action: DOWN
});
export const munch = (x, y) => ({
type: MUNCHER_ACTION,
action: MUNCH
});
export const freeze = () => ({
type: MUNCHER_ACTION,
action: FREEZE
});
export const unfreeze = () => ({
type: MUNCHER_ACTION,
action:UNFREEZE
});