Index · Правила · Поиск· Группы · Регистрация · Личные сообщения· Вход

Список разделов Флейм
 
 
 

Раздел: Флейм "Sar Wars" для программеров... 

Создана: 16 Июля 2002 Втр 18:15:00.
Раздел: "Флейм"
Сообщений в теме: 4, просмотров: 1268

  1. 16 Июля 2002 Втр 18:15:00
    interface ICreature {
    protected:
    int hands = 2;
    }

    interface IJedai : ICreature {
    bool Fight(BadGuy *who) {
    return true;
    }

    void SliceHand(ICreature *who) {
    who->hands--;
    }

    ICreature* virtual Fuck(ICreature *who) {
    if (typeof(who)!=typeof(IBadGuy)) return null;
    else {
    Fight(who);
    return null;
    }
    }

    BadGuy *goOnDarkSide() {
    newGuy = new BadGuy(this);
    delete this;
    this = newGuy;
    return this;
    }
    }

    class BadGuy : ICreature {
    bool Fight(IJedai *who) {
    return false;
    }
    }

    class SkyWalker : IJedai {
    friend class Senator;

    private:
    ICreature* father, mother;
    public:
    SkyWalker(_father, _mother) {
    father = _father;
    mother = _mother;
    }

    ICreature* virtual Fuck(ICreature *who) {
    if (typeof(who)==typeof(IFuckable)) {
    return who.makeChildFrom(this);
    }
    else {
    Fight(who);
    return null;
    }
    }
    }

    class Энокен : SkyWalker {
    friend class Padme;
    ICreature* virtual Fuck(ICreature *who) {
    if (typeof(who)==typeof(Padme)) {
    who.marry();
    ICreature* offspring = who.makeChildFrom(this);
    goOnDarkSide();
    do {
    Fight(offspring);
    } while (handCount >= 2);
    Confess(offspring, "I'm your father");
    delete this;
    return offspring;
    } else {
    return IJedai::Fuck(who);
    }
    }
    }

    class Yoda : IJedai {
    void Main() {
    if (seriesCount == 5) {
    delete this;
    }
    }
    }

    class Luk : SkyWalker {
    public:
    IUnknown *father;
    ICreature *mother;

    Luk(_father, _mother) : SkyWalker(_father, _mother) {
    }

    Confess(ICreature who, char *speech) {
    if (speech=="I'm your father") {
    Luk::father = who;
    Wonder("wow, what a surprise");
    }
    }
    } LukSkywalker;

    class Padme extends Senator implements IFuckable {
    ICreature *makeChildFrom(ICreature who) {
    if (who==Энокен) {
    return new Luk(who, this);
    }
    }
    }

    (с) [внешняя ссылка]
  2. 17 Июля 2002 Срд 15:16:00
    F:\java>javac -Xstdout compile.log Yoda.java

    compile.log:

    Yoda.java:3: illegal start of type
    protected:
    ^
    Yoda.java:4: <identifier> expected
    int hands = 2;
    ^
    Yoda.java:7: '{' expected
    interface IJedai : ICreature
    ^
    Yoda.java:39: '{' expected
    class BadGuy : ICreature
    ^
    Yoda.java:47: '{' expected
    class SkyWalker : IJedai
    ^
    Yoda.java:49: '{' expected
    friend class Senator;
    ^
    Yoda.java:51: illegal start of type
    private: ICreature* father, mother;
    ^
    Yoda.java:51: <identifier> expected
    private: ICreature* father, mother;
    ^
    Yoda.java:53: illegal start of type
    public:
    ^
    Yoda.java:71: <identifier> expected
    }
    ^
    Yoda.java:74: '{' expected
    class Anokin : SkyWalker
    ^
    Yoda.java:76: '{' expected
    friend class Padme;
    ^
    Yoda.java:77: <identifier> expected
    ICreature* virtual Fuck(ICreature *who)
    ^
    Yoda.java:97: ';' expected
    }
    ^
    Yoda.java:100: '{' expected
    class Yoda : IJedai
    ^
    Yoda.java:111: '{' expected
    class Luk : SkyWalker
    ^
    Yoda.java:133: <identifier> expected
    ICreature *makeChildFrom(ICreature who)
    ^
    Yoda.java:139: ';' expected
    }
    ^
    Yoda.java:140: '}' expected
    }
    ^
    Yoda.java:131: cannot resolve symbol
    symbol : class IFuckable
    location: class IJedai.BadGuy.SkyWalker.Anokin.Yoda.Luk.Padme
    class Padme extends Senator implements IFuckable
    ^
    20 errors
  3. sovest


    Частый гость


    Более 10 лет на форуме
    17 Июля 2002 Срд 15:44:00
    Цитата:
    В оригинале написано <brml>:
    F:\java>javac -Xstdout compile.log

    Тонкий подход к проблеме. Это JDK 1.2 заявило?
    Апдейть на вторую.
  4. 17 Июля 2002 Срд 16:02:00
    F:\java>java -version
    java version "1.4.0-rc"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-rc-b91)
    Java HotSpot(TM) Client VM (build 1.4.0-rc-b91, mixed mode)