summaryrefslogtreecommitdiff
path: root/src/actions/simulation/tick.js
blob: 68f226d79c8b9d88740a3654c9bd5acb56b94bce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export const GO_TO_TICK = "GO_TO_TICK";
export const SET_LAST_SIMULATED_TICK = "SET_LAST_SIMULATED_TICK";

export function incrementTick() {
    return (dispatch, getState) => {
        const {currentTick} = getState();
        dispatch(goToTick(currentTick + 1));
    }
}

export function goToTick(tick) {
    return {
        type: GO_TO_TICK,
        tick
    }
}

export function setLastSimulatedTick(tick) {
    return {
        type: SET_LAST_SIMULATED_TICK,
        tick
    }
}