ucsb-cs56-projects / cs56-games-treasure-hunter

-
1 stars 7 forks source link

Code for treasure sprite image #28

Closed danielledodd closed 6 years ago

danielledodd commented 8 years ago

The implementation code in GameComponent.java to make a treasure appear after finding it could be improved. Right now, its not considered to be "good code". The use of String variables can be misleading because the String is only used to activate the treasure image. For example,

if(!t.equals(""))
       g.drawImage(treasure.getCurrentImage(), treasure.getXPos(), treasure.getYPos(),null);

The t variable is currently an instance String variable. It really has no connection to the actual image. To fix, you could put the drawImage in a function or find another type of condition to have the treasure image pop up.

Suggested points: ~75

vincenicoara commented 8 years ago

W16 OK

athielk commented 8 years ago

F16 OK (75 pts) Perhaps look to make the equivalent of t an attribute of a new class for treasure look to issue #30.

lisaljy commented 7 years ago

we finish this issue~ This issue should be closed~ @athielk