Skip to content

Commit

Permalink
attempt 4
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasRamos5 committed Aug 3, 2023
1 parent 723f04f commit 9bb648d
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions _notebooks/2023-08-02-Mario-Tube.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 16,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -151,12 +151,14 @@
" player.position.x <= tube.position.x + tube.width\n",
" ) {\n",
" player.velocity.y = 0;\n",
" gravity = 0.02\n",
" player.position.y += 0.1\n",
" player.velocity.y = 0.0001\n",
" }\n",
" else {\n",
"\n",
" while (player.position.y + player.height < tube.position.y + tube.height) {\n",
" gravity = 0.02\n",
" }\n",
" gravity = 1.5\n",
" \n",
" }\n",
" \n",
" if (\n",
Expand Down Expand Up @@ -361,12 +363,14 @@
" player.position.x <= tube.position.x + tube.width\n",
" ) {\n",
" player.velocity.y = 0;\n",
" gravity = 0.02\n",
" player.position.y += 0.1\n",
" player.velocity.y = 0.0001\n",
" }\n",
" else {\n",
"\n",
" while (player.position.y + player.height < tube.position.y + tube.height) {\n",
" gravity = 0.02\n",
" }\n",
" gravity = 1.5\n",
" \n",
" }\n",
" \n",
" if (\n",
Expand Down

0 comments on commit 9bb648d

Please sign in to comment.