Search:

Type: Posts; User: Json

Search: Search took 0.11 seconds.

  1. Thread: Object or Class?

    by Json
    Replies
    23
    Views
    3,167

    Re: Object or Class?

    Not to sound too much like everyone else now but some of these questions are really making me wonder if you shouldn't try some basic tutorials first or at least make some minor things on the way to...
  2. Thread: Object or Class?

    by Json
    Replies
    23
    Views
    3,167

    Re: Object or Class?

    Yeah, so basically you would have this "FightHandler" or something and then just pass the two characters to it.



    new FightHandler().attack(characterA).with(characterB);


    :D

    // Json
  3. Thread: Object or Class?

    by Json
    Replies
    23
    Views
    3,167

    Re: Object or Class?

    Yes, dependency injection is a lot better.

    However to go back on track with this thread, what I guess you need to do is create a class that represents a character.



    // Dont mix this up with...
  4. Thread: Object or Class?

    by Json
    Replies
    23
    Views
    3,167

    Re: Object or Class?

    Just to play the devils advocate, classes without objects could be utility classes with only static methods and a private constructor :D

    // Json
Results 1 to 4 of 4