disappointed with my code

Saaa empty at needmail.com
Mon Mar 17 19:59:59 PDT 2008


>
> Is there really nothing you can give as an example?
>
> Are you writing in a procedural style?  OO-style?  What is it you don't 
> like about your code?  Are you repeating yourself a lot?  Do interfaces 
> between components seem to be too confusing or reveal too much 
> implementation detail?  Say more about what sorts of problems you have.
>
> --bb

No OO, all procedural I think.
Lets just say I write in a C-style in D.
Just recently I included the use of packages.

I think my main problem is that my program goes through a certain amount of 
stages (game) but all I could come up with is:
enum { INTRO, LEVEL_1, LEVEL_2,etc}
and everywhere do things like this:
if(stage==LEVEL_1 || stage==LEVEL_2) ...

A lot of times do things need to wait a few iterations, which I solve by 
adding local variables which count till zero.

I expect that with every 'oh is that possible' reply' my code will be a lot 
more pleasing. 




More information about the Digitalmars-d-learn mailing list