Presentation is loading. Please wait.

Presentation is loading. Please wait.

Building Memory… Day 5 – April 13, 2007. Cards on Screen How can we arrange cards in a row/column manner? Use the Position class to help us translate.

Similar presentations


Presentation on theme: "Building Memory… Day 5 – April 13, 2007. Cards on Screen How can we arrange cards in a row/column manner? Use the Position class to help us translate."— Presentation transcript:

1 Building Memory… Day 5 – April 13, 2007

2 Cards on Screen How can we arrange cards in a row/column manner? Use the Position class to help us translate row/column coordinates into java.awt.Points Use of interface for constants

3 Constants Interface Only has values in it, no methods necessarily To create a constant in the interface, it is declared to be: –public (We’ve seen this before) –static (If something is static, you do not need to create an instance of the class it is in to access it) –final (Means it can not change)

4 Cards on Screen We showed the faces on the screen to check to make sure we have 20 different cards (10 pairs of 2) and that they seemed to be reasonably randomized on the screen.

5 Problem! Only 10 pictures show up, but it seems like we have a place for 20 cards…

6 A note about references


Download ppt "Building Memory… Day 5 – April 13, 2007. Cards on Screen How can we arrange cards in a row/column manner? Use the Position class to help us translate."

Similar presentations


Ads by Google