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
| > 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 |
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 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]; |