AP Computer Science A: Difference between revisions

Content deleted Content added
No edit summary
GridWorld case study (2008-2014): self-published source
Line 88:
*'''Extensions'''
**The Case Study also includes several extensions of the above classes. "BoxBug" extends "Bug" and moves in a box shape if its route is not blocked. "ChameleonCritter" extends "Critter" and does not eat other Actors, instead changing its color to match the color one of its neighbors. "Crab Critter" moves left or right and only eats Actors in front of it, but otherwise extends the "Critter" class.
**Students often create their own extensions of the Actor class. Some common examples of student created extensions are [[Four Lords of the Diamond|Warden organisms]] and SimCity-like structures, in which objects of certain types create objects of other types based on their neighbors (much like [[Conway's Game of Life]]). Students have even created versions of the games [[Pac-Man]], [[Fire Emblem]], and [[Tetris]].<ref>{{cite web|last1=Horstmann|first1=Cay|title=Extending GridWorld|url=http://www.horstmann.com/gridworld/extending-gridworld.html|website=Extending GridWorld|access-date=22 February 2016}}</ref>{{self-published inline}}
*'''Known issues'''
**The version that is available at the College Board website, GridWorld 1.00, contains a bug (not to be confused with the Actor subclass Bug) that causes a SecurityException to be thrown when it is deployed as an [[Java applet|applet]]. This was fixed in the "unofficial code" release on the GridWorld website. Also, after setting the environment to an invalid BoundedGrid, it will cause a [[Null pointer|NullPointerException]].