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.
19 lines
526 B
19 lines
526 B
require('immutable');
|
|
import * as ScorebarActions from '../../actions/board/scorebar.actions';
|
|
import Values from '../Values';
|
|
import { SETTINGS } from '../../App';
|
|
|
|
const reducer = (state = { current: 100, high: 999, lives: SETTINGS.LIVES }, action) => {
|
|
if (action.type !== ScorebarActions.SCOREBAR_ACTION) {
|
|
return state;
|
|
}
|
|
|
|
switch (action.action) {
|
|
case ScorebarActions.UPDATE:
|
|
return { current: state.current + 10, high: 999 };
|
|
}
|
|
|
|
return state;
|
|
};
|
|
|
|
export default reducer;
|
|
|