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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| ARCH="$(dpkg --print-architecture)" | |
| echo "==> Updating apt and applying pending upgrades" | |
| sudo apt update | |
| sudo apt full-upgrade -y | |
| echo "==> Adding Brave apt repository" |
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
| class Hexagon { | |
| // function which will instantiate the class | |
| constructor(level: number, index: number) { | |
| this.level = level; | |
| this.levelId = index; | |
| this.neighbors = []; | |
| this.levelCount = (this.level - 1) * 6; |
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 simulate = (runs: number) => { | |
| let rainedOnSaturdayGivenSunday = 0; | |
| let rainySaturdaysSanityCheck = 0; | |
| let rainySundays = 0; | |
| const startTime = performance.now(); | |
| for (let i = 0; i <= runs; i++) { | |
| const hasRainedOnSaturday = Math.random() < 0.25; |