Obtain a piece of paper and label it "Graphic Library Components." Draw some sketches of graphic components for the game on the paper. Give each graphic a name and write it down next to the sketch. Draw a rectangle and name it "rectangleOne" for this example.
Write the addChild command to place rectangleOne on the game board. Write the command such that it follows the syntax "addChild(name)," or for this example "addChild(rectangleOne)." Now, write the removeChild command to remove rectangleOne from the game board such that it follows the syntax "removeChild(name)," or this example "removeChild(rectangleOne)." Repeat these two procedures for all of the graphic images listed on your paper.
Use the code to automatically add a graphic from the library to the game board when the player selects an icon in the library.