<script>
import {onMount} from 'svelte'
const colors = [
"#ebedf0",
"#9be9a8",
"#40c463",
"#30a14e",
"#216e39"
]
let weeks = []
let status = "playing"
function init() {
for (let i=0;i<52;i++) {
weeks.push([0,0,0,0,0,0,0])
}
weeks.push([0,0,0]);
}
let current = null, pieces = []
function nextPiece() {
if (current) {
pieces = [...pieces, current]
current.coordinates = coordinates(current)
}
current = {
x: randomNumber(52),
y: -1,
pixels: randomGeometry()
}
}
function randomGeometry() {