<commit_before>export const NEW_GAME = 'NEW_GAME';
export const GAME_OVER = 'GAME_OVER';
export const INCREMENT_STEPS = 'INCREMENT_STEPS';

export function incrementSteps() {
    return {
        type: INCREMENT_STEPS
    };
}

export function startNewGame() {
    return {
        type: NEW_GAME
    };
}

export function gameOver() {
    return {
        type: GAME_OVER
    };
}
<commit_msg>Moved randomizing logic to action<commit_after>import random from 'random-seed'
import {range} from 'lodash'
import { COLS, ROWS, SIZE } from '../constants/Board'

const rand = random.create()
const startRow = (ROWS - COLS)

export const NEW_GAME = 'NEW_GAME'
export const GAME_OVER = 'GAME_OVER'
export const INCREMENT_STEPS = 'INCREMENT_STEPS'

export function incrementSteps() {
    return {
        type: INCREMENT_STEPS
    }
}

export function startNewGame() {
    const positions = range(startRow * COLS, SIZE, 1).sort(() => 0.5 - rand.random())
    return {
        type: NEW_GAME,
        positions
    }
}

export function gameOver() {
    return {
        type: GAME_OVER
    }
}

{'fraction_non_alphanumeric': 0.10691244239631337, 'fraction_numerical': 0.0027649769585253456, 'mean_word_length': 3.160919540229885, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6051057', 'n_tokens_mistral': 380, 'n_tokens_neox': 363, 'n_words': 94}