Skip to content

Instantly share code, notes, and snippets.

@MarkGamed7794
Last active December 7, 2019 15:46
Show Gist options
  • Save MarkGamed7794/1dece7db1b51d438b2642775197ff384 to your computer and use it in GitHub Desktop.
Save MarkGamed7794/1dece7db1b51d438b2642775197ff384 to your computer and use it in GitHub Desktop.
SCRIPT-8
var board = []
for(var y = 0;y < 18;y++){
board.push([])
for(var x = 0;x < 10;x++){
board[y][x] = Math.floor(Math.random()*7)
}
}
init = state => {
}
update = (state, input, elapsed) => {
}
draw = state => {
clear()
for(var y = 0;y < board.length;y++){
for(var x = -1;x <= board[0].length;x++){
if(x == -1 || x == board[0].length){
sprite(x*7+7,y*7,11+(y%3)*16)
}else if(board[y][x] > 0){
sprite(x*7+7,y*7,board[y][x]-1)
}else{
rectFill(x*7+7,y*7,7,7,2)
}
}
}
}
{
"iframeVersion": "0.1.273",
"lines": [
29,
0,
0,
0,
0,
0,
0,
0
]
}
{
"0": [
"6666666 ",
"6222226 ",
"6266626 ",
"6260626 ",
"6266626 ",
"6222226 ",
"6666666 ",
" "
],
"1": [
"6666666 ",
"6444446 ",
"6444446 ",
"6444446 ",
"6444446 ",
"6444446 ",
"6666666 ",
" "
],
"2": [
"6666666 ",
"6000006 ",
"6066606 ",
"6066606 ",
"6066606 ",
"6000006 ",
"6666666 ",
" "
],
"3": [
"6666666 ",
"6444446 ",
"6466646 ",
"6460646 ",
"6466646 ",
"6444446 ",
"6666666 ",
" "
],
"4": [
"6666666 ",
"6222226 ",
"6222226 ",
"6226226 ",
"6222226 ",
"6222226 ",
"6666666 ",
" "
],
"5": [
"6666666 ",
"6222226 ",
"6200026 ",
"6202626 ",
"6266626 ",
"6222226 ",
"6666666 ",
" "
],
"6": [
"3333333 ",
"3111213 ",
"3121113 ",
"3111113 ",
"3211213 ",
"3111113 ",
"3121213 ",
" "
],
"7": [
"3333333 ",
"3121121 ",
"3111111 ",
"3212121 ",
"3111111 ",
"3121211 ",
"3333333 ",
" "
],
"8": [
"3333333 ",
"2121211 ",
"1111112 ",
"1121111 ",
"2111121 ",
"1112111 ",
"3333333 ",
" "
],
"9": [
"3333333 ",
"1121211 ",
"1111112 ",
"1121111 ",
"2111121 ",
"1112111 ",
"3333333 ",
" "
],
"10": [
"3333333 ",
"2111213 ",
"1121113 ",
"1111123 ",
"1212113 ",
"1111113 ",
"3333333 ",
" "
],
"11": [
"3333333 ",
"0113011 ",
"1113111 ",
"3333333 ",
"1301130 ",
"1311131 ",
"3333333 ",
" "
],
"16": [
"0000000 ",
"0066660 ",
"0660000 ",
"0066600 ",
"0006660 ",
"0666600 ",
"0000000 ",
" "
],
"17": [
"0000000 ",
"0066600 ",
"0660660 ",
"0660000 ",
"0660660 ",
"0066600 ",
"0000000 ",
" "
],
"18": [
"0000000 ",
"0066600 ",
"0660660 ",
"0660660 ",
"0660660 ",
"0066600 ",
"0000000 ",
" "
],
"19": [
"0000000 ",
"0666600 ",
"0660660 ",
"0660660 ",
"0666600 ",
"0660660 ",
"0000000 ",
" "
],
"20": [
"0000000 ",
"0666660 ",
"0660000 ",
"0666600 ",
"0660000 ",
"0666660 ",
"0000000 ",
" "
],
"21": [
"0000000 ",
"0660000 ",
"0660000 ",
"0660000 ",
"0660000 ",
"0666660 ",
"0000000 ",
" "
],
"22": [
"3112113 ",
"3211113 ",
"3111213 ",
"3121113 ",
"3111123 ",
"3212113 ",
"3111123 ",
" "
],
"27": [
"0113011 ",
"1113111 ",
"3333333 ",
"1301131 ",
"1311131 ",
"3333333 ",
"0113011 ",
" "
],
"32": [
"0000000 ",
"0066660 ",
"0006600 ",
"0006600 ",
"0006600 ",
"0066660 ",
"0000000 ",
" "
],
"33": [
"0000000 ",
"0600660 ",
"0660660 ",
"0666660 ",
"0606660 ",
"0600660 ",
"0000000 ",
" "
],
"34": [
"0000000 ",
"0600660 ",
"0600660 ",
"0600660 ",
"0060600 ",
"0006000 ",
"0000000 ",
" "
],
"38": [
"3112113 ",
"3211113 ",
"3111213 ",
"3121113 ",
"3111123 ",
"3212113 ",
"3111123 ",
" "
],
"43": [
"1113111 ",
"3333333 ",
"1301131 ",
"1311131 ",
"3333333 ",
"0113011 ",
"1113111 ",
" "
],
"54": [
"3111113 ",
"3112113 ",
"3211123 ",
"3112113 ",
"3211113 ",
"3111213 ",
"3333333 ",
" "
],
"100": [
"0000000 ",
"0066600 ",
"0660660 ",
"0660660 ",
"0660660 ",
"0066600 ",
"0000000 ",
" "
],
"101": [
"0000000 ",
"0006600 ",
"0066600 ",
"0006600 ",
"0006600 ",
"0006600 ",
"0000000 ",
" "
],
"102": [
"0000000 ",
"0066600 ",
"0600660 ",
"0006660 ",
"0066600 ",
"0666660 ",
"0000000 ",
" "
],
"103": [
"0000000 ",
"0666600 ",
"0006660 ",
"0066600 ",
"0006660 ",
"0666600 ",
"0000000 ",
" "
],
"104": [
"0000000 ",
"0606600 ",
"0606600 ",
"0606600 ",
"0666660 ",
"0006600 ",
"0000000 ",
" "
],
"105": [
"0000000 ",
"0666660 ",
"0660000 ",
"0666600 ",
"0006660 ",
"0666600 ",
"0000000 ",
" "
],
"106": [
"0000000 ",
"0066660 ",
"0660000 ",
"0666600 ",
"0660060 ",
"0066600 ",
"0000000 ",
" "
],
"107": [
"0000000 ",
"0666660 ",
"0000660 ",
"0006660 ",
"0066600 ",
"0066600 ",
"0000000 ",
" "
],
"108": [
"0000000 ",
"0066600 ",
"0606660 ",
"0066600 ",
"0606660 ",
"0066600 ",
"0000000 ",
" "
],
"109": [
"0000000 ",
"0066600 ",
"0606660 ",
"0066660 ",
"0006660 ",
"0666600 ",
"0000000 ",
" "
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment