/ics4u-coding-challenges

Code from in-class coding challenges.

Primary LanguageJavaScript

ICS4U Coding Challenges

Code from in-class coding challenges. These challenges are created by Dan Shiffman.

A*

This is an algorithm that uses heuristics to find an ideal path while moving. The code in this folder is not substantially edited from what was taught.

Pixel Sorting

This is an algorithm that sorts pixels in an image from top-to-bottom of the oage in order of brightness. The code in this folder is not substantially edited from what was taught, but I did use a picture of a panda.

Sparkling Metaballs

This is an algorithm that produces n-dimesional objects by changing the color of the ball as you leave the core. I changed the algorithm so that it uses RGB instead of HSL to calculate this color. I also added a random function to multiply each factor in the square root function that finds the denominator that later allows us to calculate the 'sum'. This makes the metaballs seem sparkly.

Snake Gradient

This is an adaptation of the iconic 'snake game' which we learned to code in one of the live coding challenges. In this version, I didn't change much, but I added a feature so that the snake's body gradates as you gain more length, and so that when you go off the screen the snake wraps around the other side.

Cardioid

This is an algorithm which creates a shape called a 'cardioid', which is a heart shaped curved that rolls around a circle. The code in this folder is not substantially edited from what was taught.