[General boards] [Winter 2019 courses] [Fall 2018 courses] [Summer 2018 courses] [Older or newer terms]

Fix on coordinates


#1

Can I modify all global variables r,c in all entities to be named x,y and swap all r,c variable calls so that it corresponds to FishTank calls and draw/drawString methods? (x - width, y - height)

I did not change signature of setLocation or getX getY, but I did modify what they return or what they set. i.e. setLocation gets x,y from caller and set them as corresponding xy, getX returns x and getY returns y.


#2

Yes! Even better would be to move “setLocation”, “getX” and “getY” into the FishTankEntity abstract class to avoid duplicated code :slight_smile: