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
503 B

const Immutable = require('immutable');
import * as ScorebarActions from '../../actions/board/scorebar.actions';
const initial = { current: 0, high: 0, lives: 0 };
const reducer = (state = initial, action) => {
if (action.type !== ScorebarActions.SCOREBAR_ACTION) {
return state;
}
return Immutable.Map(state)
.set('current', action.currentScore)
.set('high', action.highScore)
.set('lives', action.lives)
.toObject();
};
export default reducer;