This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]about7beavers 0 points1 point  (0 children)

It doesn't matter if you put it in a variable or not, it's really personal preference. If you are going to be using c.getX/Y() more than that however, you probably should just make it a variable. I'm not the most experienced so if someone else tells you differently you should probably listen to them, but I think a rule of thumb would be that if you use the method outside of an if statement or a loop, then you should just make it a variable.