diff --git a/assets/css/style.css.map b/assets/css/style.css.map index b2eb2e1..99a9cb8 100755 --- a/assets/css/style.css.map +++ b/assets/css/style.css.map @@ -3,12 +3,12 @@ "file": "style.css", "sources": [ "style.scss", - "../../tmp/jekyll-remote-theme-20230710-1-196feq/_sass/minima/skins/classic.scss", - "../../tmp/jekyll-remote-theme-20230710-1-196feq/_sass/minima/skins/auto.scss", - "../../tmp/jekyll-remote-theme-20230710-1-196feq/_sass/minima/initialize.scss", + "../../tmp/jekyll-remote-theme-20230710-1-1bvb9lp/_sass/minima/skins/classic.scss", + "../../tmp/jekyll-remote-theme-20230710-1-1bvb9lp/_sass/minima/skins/auto.scss", + "../../tmp/jekyll-remote-theme-20230710-1-1bvb9lp/_sass/minima/initialize.scss", "_sass/minima/custom-variables.scss", - "../../tmp/jekyll-remote-theme-20230710-1-196feq/_sass/minima/_base.scss", - "../../tmp/jekyll-remote-theme-20230710-1-196feq/_sass/minima/_layout.scss", + "../../tmp/jekyll-remote-theme-20230710-1-1bvb9lp/_sass/minima/_base.scss", + "../../tmp/jekyll-remote-theme-20230710-1-1bvb9lp/_sass/minima/_layout.scss", "_sass/minima/custom-styles.scss", "_sass/minima/fastpages-styles.scss", "_sass/minima/fastpages-dracula-highlight.scss", diff --git a/assets/js/search-data.json b/assets/js/search-data.json index 7cab777..52c28a0 100755 --- a/assets/js/search-data.json +++ b/assets/js/search-data.json @@ -3,7 +3,7 @@ "post0": { "title": "Mario Lesson", - "content": "%%html <style> #canvas { margin: 0; border: 1px solid black; } </style> <canvas id="canvas"></canvas> <script> const canvas = document.getElementById('canvas'); const c = canvas.getContext('2d'); canvas.width = 770; canvas.height = 300; const gravity = 1.5; class Player { constructor() { this.position = { x: 100, y: 100 }; this.velocity = { x: 0, y: 0 }; this.width = 30; this.height = 30; } draw() { c.fillStyle = 'red'; c.fillRect(this.position.x, this.position.y, this.width, this.height); } update() { this.draw(); this.position.y += this.velocity.y; this.position.x += this.velocity.x; if (this.position.y + this.height + this.velocity.y <= canvas.height) this.velocity.y += gravity; else this.velocity.y = 0; } } const player = new Player(); const keys = { right: { pressed: false }, left: { pressed: false } }; function animate() { requestAnimationFrame(animate); c.clearRect(0, 0, canvas.width, canvas.height); player.update(); if (keys.right.pressed) { player.velocity.x = 15; } else if (keys.left.pressed) { player.velocity.x = -15; } else { player.velocity.x = 0; } } animate(); addEventListener('keydown', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys.left.pressed = true; break; case 83: console.log('down'); break; case 68: console.log('right'); keys.right.pressed = true; break; case 87: console.log('up'); player.velocity.y -= 20; break; } }); addEventListener('keyup', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys.left.pressed = false; break; case 83: console.log('down'); break; case 68: console.log('right'); keys.right.pressed = false; break; case 87: console.log('up'); player.velocity.y -= 20; break; } }); </script> . %%html <style> #canvas1 { margin: 0; border: 1px solid black; } </style> <canvas id="canvas1"></canvas> <script> const canvas1 = document.getElementById('canvas1'); const c1 = canvas1.getContext('2d'); canvas1.width = 770; canvas1.height = 300; const gravity1 = 1.5; class Player1 { constructor() { this.position = { x: 100, y: 100 }; this.velocity = { x: 0, y: 0 }; this.width = 30; this.height = 30; } draw() { c1.fillStyle = 'red'; c1.fillRect(this.position.x, this.position.y, this.width, this.height); } update() { this.draw(); this.position.y += this.velocity.y; this.position.x += this.velocity.x; if (this.position.y + this.height + this.velocity.y <= canvas1.height) this.velocity.y += gravity1; else this.velocity.y = 0; } } class Platform { constructor(image) { this.position = { x: 0, y: 200 } this.image = image; this.width = 540; this.height = 160; } draw() { c1.drawImage(this.image, this.position.x, this.position.y); } } let image = new Image(); image.onload = function() { const player1 = new Player1(); const platform = new Platform(image); const keys1 = { right: { pressed: false }, left: { pressed: false } }; function animate1() { requestAnimationFrame(animate1); c1.clearRect(0, 0, canvas1.width, canvas1.height); player1.update(); platform.draw(); if (keys1.right.pressed) { player1.velocity.x = 5; } else if (keys1.left.pressed) { player1.velocity.x = -5; } else { player1.velocity.x = 0; } if ( player1.position.y + player1.height <= platform.position.y && player1.position.y + player1.height + player1.velocity.y >= platform.position.y && player1.position.x + player1.width >= platform.position.x && player1.position.x <= platform.position.x + platform.width ) { player1.velocity.y = 0; } } animate1(); addEventListener('keydown', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys1.left.pressed = true; break; case 83: console.log('down'); break; case 68: console.log('right'); keys1.right.pressed = true; break; case 87: console.log('up'); player1.velocity.y -= 20; break; } }); addEventListener('keyup', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys1.left.pressed = false; break; case 83: console.log('down'); break; case 68: console.log('right'); keys1.right.pressed = false; break; case 87: console.log('up'); player1.velocity.y -= 20; break; } }); }; image.src = 'https://samayass.github.io/samayaCSA/images/platform.png'; </script> . -a . %%html <style> #canvas2 { margin: 0; border: 1px solid black; } </style> <canvas id="canvas2"></canvas> <script> const canvas2 = document.getElementById('canvas2'); const c2 = canvas2.getContext('2d'); canvas2.width = 770; canvas2.height = 300; const gravity2 = 1.5; class Player2 { constructor() { this.position = { x: 100, y: 100 }; this.velocity = { x: 0, y: 0 }; this.width = 30; this.height = 30; } draw() { c2.fillStyle = 'red'; c2.fillRect(this.position.x, this.position.y, this.width, this.height); } update() { this.draw(); this.position.y += this.velocity.y; this.position.x += this.velocity.x; if (this.position.y + this.height + this.velocity.y <= canvas2.height) this.velocity.y += gravity2; else this.velocity.y = 0; } } class Platform2 { constructor(image) { this.position = { x: 0, y: 200 } this.image = image; this.width = 540; this.height = 160; } draw() { c2.drawImage(this.image, this.position.x, this.position.y); } } class Tube { constructor(image) { this.position = { x: 10, y: 10 } this.image = image; this.width = 540; this.height = 160; } draw() { c2.drawImage(this.image, this.position.x, this.position.y); } } const image2 = new Image(); image2.onload = function() { const player2 = new Player2(); const platform2 = new Platform2(image2); const tube = new Tube(image2); const keys2 = { right: { pressed: false }, left: { pressed: false } }; function animate2() { requestAnimationFrame(animate2); c2.clearRect(0, 0, canvas2.width, canvas2.height); player2.update(); platform2.draw(); tube.draw(); if (keys2.right.pressed) { player2.velocity.x = 5; } else if (keys2.left.pressed) { player2.velocity.x = -5; } else { player2.velocity.x = 0; } if ( player2.position.y + player2.height <= platform2.position.y && player2.position.y + player2.height + player2.velocity.y >= platform2.position.y && player2.position.x + player2.width >= platform2.position.x && player2.position.x <= platform2.position.x + platform2.width ) { player2.velocity.y = 0; } } animate2(); addEventListener('keydown', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys2.left.pressed = true; break; case 83: console.log('down'); break; case 68: console.log('right'); keys2.right.pressed = true; break; case 87: console.log('up'); player2.velocity.y -= 20; break; } }); addEventListener('keyup', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys2.left.pressed = false; break; case 83: console.log('down'); break; case 68: console.log('right'); keys2.right.pressed = false; break; case 87: console.log('up'); player2.velocity.y -= 20; break; } }); }; const imageTube = new Image(); imageTube.onload = function() { image2.src = 'https://samayass.github.io/samayaCSA/images/platform.png'; }; imageTube.src = 'https://samayass.github.io/samayaCSA/images/platform.png'; </script> . okay okay okay okay . %%html <style> #canvas1 { margin: 0; border: 1px solid black; } </style> <canvas id="canvas1"></canvas> <script> const canvas1 = document.getElementById('canvas1'); const c1 = canvas1.getContext('2d'); canvas1.width = 770; canvas1.height = 300; const gravity1 = 1.5; class Player1 { constructor() { this.position = { x: 100, y: 100 }; this.velocity = { x: 0, y: 0 }; this.width = 30; this.height = 30; } draw() { c1.fillStyle = 'red'; c1.fillRect(this.position.x, this.position.y, this.width, this.height); } update() { this.draw(); this.position.y += this.velocity.y; this.position.x += this.velocity.x; if (this.position.y + this.height + this.velocity.y <= canvas1.height) this.velocity.y += gravity1; else this.velocity.y = 0; } } class Platform { constructor(image) { this.position = { x: 0, y: 200 } this.image = image; this.width = 540; this.height = 160; } draw() { c1.drawImage(this.image, this.position.x, this.position.y); } } let image = new Image(); image.onload = function() { const player1 = new Player1(); const platform = new Platform(image); const keys1 = { right: { pressed: false }, left: { pressed: false } }; function animate1() { requestAnimationFrame(animate1); c1.clearRect(0, 0, canvas1.width, canvas1.height); player1.update(); platform.draw(); if (keys1.right.pressed) { player1.velocity.x = 5; } else if (keys1.left.pressed) { player1.velocity.x = -5; } else { player1.velocity.x = 0; } if ( player1.position.y + player1.height <= platform.position.y && player1.position.y + player1.height + player1.velocity.y >= platform.position.y && player1.position.x + player1.width >= platform.position.x && player1.position.x <= platform.position.x + platform.width ) { player1.velocity.y = 0; } } animate1(); addEventListener('keydown', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys1.left.pressed = true; break; case 83: console.log('down'); break; case 68: console.log('right'); keys1.right.pressed = true; break; case 87: console.log('up'); player1.velocity.y -= 20; break; } }); addEventListener('keyup', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys1.left.pressed = false; break; case 83: console.log('down'); break; case 68: console.log('right'); keys1.right.pressed = false; break; case 87: console.log('up'); player1.velocity.y -= 20; break; } }); }; image.src = 'https://samayass.github.io/samayaCSA/images/platform.png'; </script> .", + "content": "%%html <style> #canvas { margin: 0; border: 1px solid black; } </style> <canvas id="canvas"></canvas> <script> const canvas = document.getElementById('canvas'); const c = canvas.getContext('2d'); canvas.width = 770; canvas.height = 300; const gravity = 1.5; class Player { constructor() { this.position = { x: 100, y: 100 }; this.velocity = { x: 0, y: 0 }; this.width = 30; this.height = 30; } draw() { c.fillStyle = 'red'; c.fillRect(this.position.x, this.position.y, this.width, this.height); } update() { this.draw(); this.position.y += this.velocity.y; this.position.x += this.velocity.x; if (this.position.y + this.height + this.velocity.y <= canvas.height) this.velocity.y += gravity; else this.velocity.y = 0; } } const player = new Player(); const keys = { right: { pressed: false }, left: { pressed: false } }; function animate() { requestAnimationFrame(animate); c.clearRect(0, 0, canvas.width, canvas.height); player.update(); if (keys.right.pressed) { player.velocity.x = 15; } else if (keys.left.pressed) { player.velocity.x = -15; } else { player.velocity.x = 0; } } animate(); addEventListener('keydown', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys.left.pressed = true; break; case 83: console.log('down'); break; case 68: console.log('right'); keys.right.pressed = true; break; case 87: console.log('up'); player.velocity.y -= 20; break; } }); addEventListener('keyup', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys.left.pressed = false; break; case 83: console.log('down'); break; case 68: console.log('right'); keys.right.pressed = false; break; case 87: console.log('up'); player.velocity.y -= 20; break; } }); </script> . %%html <style> #canvas1 { margin: 0; border: 1px solid black; } </style> <canvas id="canvas1"></canvas> <script> const canvas1 = document.getElementById('canvas1'); const c1 = canvas1.getContext('2d'); canvas1.width = 770; canvas1.height = 300; const gravity1 = 1.5; class Player1 { constructor() { this.position = { x: 100, y: 100 }; this.velocity = { x: 0, y: 0 }; this.width = 30; this.height = 30; } draw() { c1.fillStyle = 'red'; c1.fillRect(this.position.x, this.position.y, this.width, this.height); } update() { this.draw(); this.position.y += this.velocity.y; this.position.x += this.velocity.x; if (this.position.y + this.height + this.velocity.y <= canvas1.height) this.velocity.y += gravity1; else this.velocity.y = 0; } } class Platform { constructor(image) { this.position = { x: 0, y: 200 } this.image = image; this.width = 540; this.height = 160; } draw() { c1.drawImage(this.image, this.position.x, this.position.y); } } let image = new Image(); image.onload = function() { const player1 = new Player1(); const platform = new Platform(image); const keys1 = { right: { pressed: false }, left: { pressed: false } }; function animate1() { requestAnimationFrame(animate1); c1.clearRect(0, 0, canvas1.width, canvas1.height); player1.update(); platform.draw(); if (keys1.right.pressed) { player1.velocity.x = 5; } else if (keys1.left.pressed) { player1.velocity.x = -5; } else { player1.velocity.x = 0; } if ( player1.position.y + player1.height <= platform.position.y && player1.position.y + player1.height + player1.velocity.y >= platform.position.y && player1.position.x + player1.width >= platform.position.x && player1.position.x <= platform.position.x + platform.width ) { player1.velocity.y = 0; } } animate1(); addEventListener('keydown', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys1.left.pressed = true; break; case 83: console.log('down'); break; case 68: console.log('right'); keys1.right.pressed = true; break; case 87: console.log('up'); player1.velocity.y -= 20; break; } }); addEventListener('keyup', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys1.left.pressed = false; break; case 83: console.log('down'); break; case 68: console.log('right'); keys1.right.pressed = false; break; case 87: console.log('up'); player1.velocity.y -= 20; break; } }); }; image.src = 'https://samayass.github.io/samayaCSA/images/platform.png'; </script> . -a . %%html <style> #canvas2 { margin: 0; border: 1px solid black; } </style> <canvas id="canvas2"></canvas> <script> const canvas2 = document.getElementById('canvas2'); const c2 = canvas2.getContext('2d'); canvas2.width = 770; canvas2.height = 300; const gravity2 = 1.5; class Player2 { constructor() { this.position = { x: 100, y: 100 }; this.velocity = { x: 0, y: 0 }; this.width = 30; this.height = 30; } draw() { c2.fillStyle = 'red'; c2.fillRect(this.position.x, this.position.y, this.width, this.height); } update() { this.draw(); this.position.y += this.velocity.y; this.position.x += this.velocity.x; if (this.position.y + this.height + this.velocity.y <= canvas2.height) this.velocity.y += gravity2; else this.velocity.y = 0; } } class Platform2 { constructor(image) { this.position = { x: 0, y: 200 } this.image = image; this.width = 540; this.height = 160; } draw() { c2.drawImage(this.image, this.position.x, this.position.y); } } class Tube { constructor(image) { this.position = { x: 10, y: 10 } this.image = image; this.width = 540; this.height = 160; } draw() { c2.drawImage(this.image, this.position.x, this.position.y); } } const image2 = new Image(); image2.onload = function() { const player2 = new Player2(); const platform2 = new Platform2(image2); const tube = new Tube(image2); const keys2 = { right: { pressed: false }, left: { pressed: false } }; function animate2() { requestAnimationFrame(animate2); c2.clearRect(0, 0, canvas2.width, canvas2.height); player2.update(); platform2.draw(); tube.draw(); if (keys2.right.pressed) { player2.velocity.x = 5; } else if (keys2.left.pressed) { player2.velocity.x = -5; } else { player2.velocity.x = 0; } if ( player2.position.y + player2.height <= platform2.position.y && player2.position.y + player2.height + player2.velocity.y >= platform2.position.y && player2.position.x + player2.width >= platform2.position.x && player2.position.x <= platform2.position.x + platform2.width ) { player2.velocity.y = 0; } } animate2(); addEventListener('keydown', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys2.left.pressed = true; break; case 83: console.log('down'); break; case 68: console.log('right'); keys2.right.pressed = true; break; case 87: console.log('up'); player2.velocity.y -= 20; break; } }); addEventListener('keyup', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys2.left.pressed = false; break; case 83: console.log('down'); break; case 68: console.log('right'); keys2.right.pressed = false; break; case 87: console.log('up'); player2.velocity.y -= 20; break; } }); }; const imageTube = new Image(); imageTube.onload = function() { image2.src = 'https://samayass.github.io/samayaCSA/images/platform.png'; }; imageTube.src = 'https://NicholasRamos5.github.io/VSCodings/images/MarioItems/tube.png'; </script> . okay okay okay okay . %%html <style> #canvas1 { margin: 0; border: 1px solid black; } </style> <canvas id="canvas1"></canvas> <script> const canvas1 = document.getElementById('canvas1'); const c1 = canvas1.getContext('2d'); canvas1.width = 770; canvas1.height = 300; const gravity1 = 1.5; class Player1 { constructor() { this.position = { x: 100, y: 100 }; this.velocity = { x: 0, y: 0 }; this.width = 30; this.height = 30; } draw() { c1.fillStyle = 'red'; c1.fillRect(this.position.x, this.position.y, this.width, this.height); } update() { this.draw(); this.position.y += this.velocity.y; this.position.x += this.velocity.x; if (this.position.y + this.height + this.velocity.y <= canvas1.height) this.velocity.y += gravity1; else this.velocity.y = 0; } } class Platform { constructor(image) { this.position = { x: 0, y: 200 } this.image = image; this.width = 540; this.height = 160; } draw() { c1.drawImage(this.image, this.position.x, this.position.y); } } let image = new Image(); image.onload = function() { const player1 = new Player1(); const platform = new Platform(image); const keys1 = { right: { pressed: false }, left: { pressed: false } }; function animate1() { requestAnimationFrame(animate1); c1.clearRect(0, 0, canvas1.width, canvas1.height); player1.update(); platform.draw(); if (keys1.right.pressed) { player1.velocity.x = 5; } else if (keys1.left.pressed) { player1.velocity.x = -5; } else { player1.velocity.x = 0; } if ( player1.position.y + player1.height <= platform.position.y && player1.position.y + player1.height + player1.velocity.y >= platform.position.y && player1.position.x + player1.width >= platform.position.x && player1.position.x <= platform.position.x + platform.width ) { player1.velocity.y = 0; } } animate1(); addEventListener('keydown', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys1.left.pressed = true; break; case 83: console.log('down'); break; case 68: console.log('right'); keys1.right.pressed = true; break; case 87: console.log('up'); player1.velocity.y -= 20; break; } }); addEventListener('keyup', ({ keyCode }) => { switch (keyCode) { case 65: console.log('left'); keys1.left.pressed = false; break; case 83: console.log('down'); break; case 68: console.log('right'); keys1.right.pressed = false; break; case 87: console.log('up'); player1.velocity.y -= 20; break; } }); }; image.src = 'https://samayass.github.io/samayaCSA/images/platform.png'; </script> .", "url": "https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/13/Mario.html", "relUrl": "/college%20board/java/2023/06/13/Mario.html", "date": " • Jun 13, 2023" diff --git a/college board/java/2023/06/13/Mario.html b/college board/java/2023/06/13/Mario.html index ceaec88..dce27ba 100755 --- a/college board/java/2023/06/13/Mario.html +++ b/college board/java/2023/06/13/Mario.html @@ -868,7 +868,7 @@

Mario Lesson

image2.src = 'https://samayass.github.io/samayaCSA/images/platform.png'; }; - imageTube.src = 'https://samayass.github.io/samayaCSA/images/platform.png'; + imageTube.src = 'https://NicholasRamos5.github.io/VSCodings/images/MarioItems/tube.png'; </script> diff --git a/feed.xml b/feed.xml index e2ddc2b..85943c5 100755 --- a/feed.xml +++ b/feed.xml @@ -1 +1 @@ -Jekyll2023-07-10T14:27:22-05:00https://nicholasramos5.github.io/VSCodings/feed.xmlNicholas’ fastpagesA very cool blog platformMario Lesson2023-06-13T00:00:00-05:002023-06-13T00:00:00-05:00https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/13/Mario

College Board Notes2023-06-10T00:00:00-05:002023-06-10T00:00:00-05:00https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/10/CollegeBoardPrepAPCSA Reflection2023-06-06T00:00:00-05:002023-06-06T00:00:00-05:00https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/06/ReflectionLesson 3 Hacks2023-04-27T00:00:00-05:002023-04-27T00:00:00-05:00https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/04/27/LessonTheLastTitle2023-04-27T00:00:00-05:002023-04-27T00:00:00-05:00https://nicholasramos5.github.io/VSCodings/2023/04/27/Lesson3 \ No newline at end of file +Jekyll2023-07-10T14:31:16-05:00https://nicholasramos5.github.io/VSCodings/feed.xmlNicholas’ fastpagesA very cool blog platformMario Lesson2023-06-13T00:00:00-05:002023-06-13T00:00:00-05:00https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/13/MarioCollege Board Notes2023-06-10T00:00:00-05:002023-06-10T00:00:00-05:00https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/10/CollegeBoardPrepAPCSA Reflection2023-06-06T00:00:00-05:002023-06-06T00:00:00-05:00https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/06/ReflectionLesson 3 Hacks2023-04-27T00:00:00-05:002023-04-27T00:00:00-05:00https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/04/27/LessonTheLastTitle2023-04-27T00:00:00-05:002023-04-27T00:00:00-05:00https://nicholasramos5.github.io/VSCodings/2023/04/27/Lesson3 \ No newline at end of file