This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { getScore, generateStamps } from './getScore'; | |
import type { Score, Stamp } from './getScore'; | |
describe('getScore', () => { | |
let gameStamps: Stamp[]; | |
beforeAll(() => { | |
gameStamps = generateStamps(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TIMESTAMPS_COUNT = 50000; | |
const PROBABILITY_SCORE_CHANGED = 0.0001; | |
const PROBABILITY_HOME_SCORE = 0.45; | |
const OFFSET_MAX_STEP = 3; | |
type Score = { | |
home: number; |