Skip to content

Instantly share code, notes, and snippets.

View let-aurn's full-sized avatar
🔥

Let Aurn IV let-aurn

🔥
View GitHub Profile
@let-aurn
let-aurn / liga-20-21-result
Created May 16, 2021 02:32
Liga 2020/2021 simulation (result)
> Match day 1: Atlético Madrid wins
> Match day 1: Real Madrid wins
> Match day 1: FC Barcelona wins
> Match day 2: Atlético Madrid wins
> Match day 2: Real Madrid wins
> Match day 2: FC Barcelona wins
🏆 Atlético Madrid Champion [ 86, 84, 82 ]
> Match day 2: FC Barcelona draws
🏆 Atlético Madrid Champion [ 86, 84, 80 ]
> Match day 2: FC Barcelona looses
@let-aurn
let-aurn / liga-20-21-script.js
Last active May 16, 2021 02:31
Liga 2020/2021 simulation (script)
const TEAMS = [ 'Atlético Madrid', 'Real Madrid', 'FC Barcelona' ];
const TABLE = [ 80, 78, 76 ];
const REMAINING_MATCH_DAYS = 2;
const GAME_RESULTS = [ 'win', 'draw', 'loose' ];
const CHANCE_OF_BEING_CHAMPION = [ 0, 0, 0 ];
let MATCH_DAY = 1;
function runSimulation(teams, t, iteration) {
const table = [...t];