Skip to content

upperlinecode/conditional-challenges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Conditional Challenges

Color Battle

color battle

Write a program that divides a canvas into two different colored rectangles. Clicking on one rectangle should increase it's size by a small, set amount, try 10 px.

When the rectangle that is 'underneath' in the code grows larger, make sure the one 'on top' shrinks accordingly so we can see the growth. There's actually several ways to implement this app!

Ensure that either rectangle cannot have a height smaller than 10 px. Always leave a little to click on so that color can make a comeback!

Can you make this a two-player game-- one player on the mouse, one on the keyboard. What additional features could you add?

(TODO, additional challenges, make something appear/disappear on hover)

About

Upperline p5.js lab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published