Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Object-oriented programming is a programming paradigm using "objects": data structures consisting of data fields and methods together with their interactions.
6
votes
Accepted
Skill Upgrades for Strategy Game
Lots of duplicated code
You have 7 methods like -(void) skillUpMining;. They all do the same thing - increment a variable. Why not write one method that takes an argument specifying which skill to t …
3
votes
Job Queue for Strategy Game
There's a lot of code here and I probably don't have time to do a proper review.
You are right, it is complicated. It's hard to tell if that is inherent in the task, or the result of your design cho …
2
votes
Fraction class implemented in Objective-C
Hide the implementation details
I think the numerator and denominator properties should be readonly from the outside and readwrite on the inside of the class. There should be no way for calling code …
4
votes
Revised Job Queue for Strategy Game
nhgrif gave a very good review and I can’t add much to it.
But I’ll complain about one thing that wasn’t mentioned yet. Your code does some casting, and casting is often an evil that should be avoide …