posted 11 years ago
I am not a game coder...but this looks a little redundant. Is there any way both of these can be different? don't both or neither have to be true?
in any case...tell me, in ENGLISH, how you determine the color of a square. It seems like you are writing code without necessarily knowing what you are trying to do...a common mistake that many people make.
You generally want to spend 90% of your time thinking about how to write your code, and 10% actually writing it. That means you need to do a lot of writing, erasing, revising, editing, and changing your code. If you can't tell me what you are trying to do, in English, you shouldn't be writing code yet.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors