Avoid the red arrows by navigating the bee using the arrow keys. Collect flowers to shoot at the arrows and collect points by getting flowers, hitting arrows and reaching vegetables. When you reach 1000 points, a honey pot appears. To win the game reach the honey pot.

Program2Play

bee.x += fun;

Previous lesson

Lesson by topic

  • Graphics Coordinate System
  • Basic horizontal motion
  • Gravity: part 1
  • Horizontal/vertical/diagonal motion with direction change
  • Basic animation (erase, move draw
  • Basic graphics calls
  • Basic object interaction
  • Event handling: responding to key events
  • Motion responding to angle of graphic object. Using basic trigonometry
  • Placing objects randomly at timed intervals
  • Working with an array of objects: iteration
  • Working with an array of objects: iteration Part 2
  • Complex navigation algorithm
  • .
  • .
  • .

Lesson by number

  • Lesson 1
  • Lesson 2
  • Lesson 2b
  • Lesson 2c
  • Lesson 2d
  • Lesson 3
  • Lesson 4
  • Lesson 5a
  • Lesson 5b
  • Lesson 6
  • Lesson 7
  • Lesson 8
  • Lesson 9
  • Lesson 10
  • Lesson 11
  • Lesson 12
  • Lesson 13
  • .
  • .
  • .

Next Lesson

Video

Assignments

  • Assignment 1
  • Assignment 2
  • Assignment 3
  • Assignment 4
  • Assignment 5
  • Assignment 6
  • Assignment 7
  • Assignment 8
  • Assignment 9
  • Assignment 10
  • Assignment 11
  • .
  • .
  • .

In the text area to the left create a function and associated setInterval to move the arrows using the Arrow class provided and following resources:
arrow images: imageArrowRight,imageArrowLeft,imageArrowUp, imageArrowDown
Context for drawing the arrows: context2
Use function: checkMaze(integerValue) returns true/false . integerValue is the dot number checked: true means that the dot is part of black area (not navigable). So, true means the arrow may not enter this area. The maze is defined over rectangular configuration of dots, numbered from 0 through dotList.length. Zero starts in the upper lefthand corner of the game area.

function Arrow(x, y, chngX, chngY, dot, image) {
this.x= x;
this.y = y;
this.dot = dot;
this.chngX = chngX;
this.chngY = chngY;
this.image = image;
this.width = image.width;
this.height = image.height;
};