From bc4eb8e8d29e454b520743f7de48e8ed99e02646 Mon Sep 17 00:00:00 2001 From: Nicole McCabe Date: Wed, 2 Sep 2020 19:33:12 +0100 Subject: [PATCH] Delete Pipe.pde --- Nicole's Team/FlappyBird/Pipe/Pipe.pde | 38 -------------------------- 1 file changed, 38 deletions(-) delete mode 100644 Nicole's Team/FlappyBird/Pipe/Pipe.pde diff --git a/Nicole's Team/FlappyBird/Pipe/Pipe.pde b/Nicole's Team/FlappyBird/Pipe/Pipe.pde deleted file mode 100644 index fb812f7..0000000 --- a/Nicole's Team/FlappyBird/Pipe/Pipe.pde +++ /dev/null @@ -1,38 +0,0 @@ -class Pipe { - float x; - float top; - float bottom; - float w = 40; - - Pipe() { - x = wid + w; - top = random(100, height/2); - bottom = random(100, height/2); - } - - boolean hits(Bird b) { - if ((b.pos.x > x) && (b.pos.x < (x + w))) { - if ((b.pos.y < (top + b.r)) || (b.pos.y > (height - bottom - b.r))) { - return true; - } - } - return false; - } - - void update() { - x -= 3; - } - - void show(boolean hit) { - stroke(255); - - if (hit) { - fill(255, 0, 0); - } else { - fill(255); - } - - rect(x, 0, w, top); - rect(x, height - bottom, w, bottom); - } -}