Learn to Program with ZedLX

Free Online Programming Course for Beginners

Arrays [10/11]

This program also moves the discs by the motion vector mv.

To see the position and the motion vector of each disc, uncomment the lines starting with ///.

Exercise:

  1. Make each disc move in a different direction. The motion vector for each disc should be specified by a different unlabeled initializer.

    (The solution is provided on the next page.)

Loading...