I am creating a game (Tetris). Everything is going well, but I have a small problem:
Graphics (and the general coordinate system) takes an ordered pair (x, y) for the location, which is opposite to that of arrays (row, column), because row is actually y. How do I fix this problem? It wouldn't help to reverse them, because then the painting is done sideways and looks weird.
Also, how should I implement a Board class internally (keep an array of Pieces, etc.)?
Thanks!
Graphics (and the general coordinate system) takes an ordered pair (x, y) for the location, which is opposite to that of arrays (row, column), because row is actually y. How do I fix this problem? It wouldn't help to reverse them, because then the painting is done sideways and looks weird.
Also, how should I implement a Board class internally (keep an array of Pieces, etc.)?
Thanks!