Presentation is loading. Please wait.

Presentation is loading. Please wait.

Building Memory… Day 4 – November 20, 2006. Some clean up from last time Applet class can now be run as either an Applet or an Application Made picture.

Similar presentations


Presentation on theme: "Building Memory… Day 4 – November 20, 2006. Some clean up from last time Applet class can now be run as either an Applet or an Application Made picture."— Presentation transcript:

1 Building Memory… Day 4 – November 20, 2006

2 Some clean up from last time Applet class can now be run as either an Applet or an Application Made picture from card appear (needed to set its Dimension) Also needed to set the Dimension of the DrawingCanvas

3 We want to flip! Changed card to take in a DrawingCanvas as a parameter to the constructor and the card puts itself on the canvas

4 Card Has a state It is either face up or face down Starts face down

5 Card States Are composed of the image that they should display when a card is in that state. Creating an instance of a card state causes the correct picture to be displayed.

6 Flip! Need to add a mouse listener to the images to get them to respond correctly to the user’s desire for the cards to flip.

7 What should a card do when flipped? The old image should be removed from the canvas The card should change state The new image should be placed on the canvas

8 Open issues There are lots, but one that came up during class: –Taking care of multiple cards on the screen We need to be able to independently place each card Perhaps that info needs to be a parameter


Download ppt "Building Memory… Day 4 – November 20, 2006. Some clean up from last time Applet class can now be run as either an Applet or an Application Made picture."

Similar presentations


Ads by Google