FishBowl

Type a number in the lower field to establish the number of tries the fish will have to consume enough pellets to be full. By default, three pellets are needed. The positions of the pellets are generated automatically each time the fish turns around.

Application Commentary
This application explores the use of such classes as Sprite, Point, and Timer. Possible changes include:
  • Add bubbles or other effects in the background.
  • Add Symbols that can clicked to determine the number of chances rather than having users type in values.
  • Change the coordinate values for the fish so that it is lower on the stage; increase the range of the random numbers generated, making it harder to arrive at a full fish.
  • Add a field that allows the user to set the number of pellets the fish must consume before being full. (By default, the fish must consume three pellets.)