For example, consider the map shown on the right and its corresponding canvas next to it. The initial positions of carrots, rabbit, foxes, and spinstars are explicitly specified in the map and they are drawn on the canvas according to the grid positions. (Both foxes have moved a bit from their initial position when the image is taken) Each character is represented by a letter. For example, 'r' for rabbit, 's' for spinstar, etc. '-' is used to represent blank spaces. Note that you can also place walls (w) in your map. For the full chart of GameChangineer characters and their corresponding letters, click 'Show/Hide Map Keys' on the game page.
Quiz: What is the difference between 'w--w' and 'w w' in the map? (That is, what is the difference between '-' and space ' ' in the map?)
Each pixel has an x,y-coordinate. The grid is organized such that the origin, or (0,0), is at the upper left corner of the canvas. The x-coordinate values increase as we move right, and the y-coordinate values increase as we move down.
Data structures are what we use to organize data. In general, data structures are used to hold the attributes of an object. Simple data structures are sufficient to represent attributes such as if the object is dead or not. More sophisticated data structures are especially useful to represent more complex attributes, such as the x and y coordinate-pairs of each object, etc. Complex data structures can even hold a heterogeneous set of attributes for the object.