I'm trying to make a simple chess game, because I wanted to practice java a bit. I decided, that every single one of my tiles will be an object. And when it came to making the constructor for the Tile class I came upon a "problem". I'm not sure whether I should have a single JPanel object as the parameter (actually a Class extending JPanel, but nevermind that) thus computing the height and width 64 times (I want to let the "user" resize the window, so it can't be constant) or should I add additional parameters to the constructor, and compute it only once before creating Tile objects? Which would be a better practice in general (since in this case it doesn't seem like it would make a big difference) and why?
Thanks for the answers