Skip to content

Commit

Permalink
attempt 3
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasRamos5 committed Aug 3, 2023
1 parent 29a4b64 commit 723f04f
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 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": 13,
"execution_count": 15,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -149,16 +149,14 @@
" player.position.y + player.height + player.velocity.y >= tube.position.y &&\n",
" player.position.x + player.width >= tube.position.x &&\n",
" player.position.x <= tube.position.x + tube.width\n",
" ) \n",
" {\n",
" ) {\n",
" player.velocity.y = 0;\n",
" gravity = 0.02\n",
" player.position.y += 0.1\n",
" player.velocity.y = 0.0001\n",
"\n",
" while (!(player.position.y + player.height == tube.position.y + tube.height)) {\n",
" gravity = 0.02\n",
" }\n",
" }\n",
" else {\n",
" gravity = 1.5\n",
"\n",
" }\n",
" \n",
" if (\n",
Expand Down Expand Up @@ -361,16 +359,14 @@
" player.position.y + player.height + player.velocity.y >= tube.position.y &&\n",
" player.position.x + player.width >= tube.position.x &&\n",
" player.position.x <= tube.position.x + tube.width\n",
" ) \n",
" {\n",
" ) {\n",
" player.velocity.y = 0;\n",
" gravity = 0.02\n",
" player.position.y += 0.1\n",
" player.velocity.y = 0.0001\n",
"\n",
" while (!(player.position.y + player.height == tube.position.y + tube.height)) {\n",
" gravity = 0.02\n",
" }\n",
" }\n",
" else {\n",
" gravity = 1.5\n",
"\n",
" }\n",
" \n",
" if (\n",
Expand Down

0 comments on commit 723f04f

Please sign in to comment.