Skip to content

Instantly share code, notes, and snippets.

@Gi972
Created February 14, 2020 18:43
Show Gist options
  • Select an option

  • Save Gi972/cb074e9aac7c9aa9ae1213f26373f086 to your computer and use it in GitHub Desktop.

Select an option

Save Gi972/cb074e9aac7c9aa9ae1213f26373f086 to your computer and use it in GitHub Desktop.
SCRIPT-8
init = state => {
state.ball={x:10,y:10, radius}
state.player={x:80 , y:58}
}
update = (state, input, elapsed) => {
}
draw = state => {
const{
player,
ball
} = state;
circFill(player.x, player.y, player.radius)
}
{
"iframeVersion": "0.1.280",
"lines": [
19,
0,
0,
0,
0,
0,
0,
0
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment