Complete.Org: Mailing Lists: Archives: freeciv-dev: February 1999:
Re: [Freeciv-Dev] Serious Suggestions
Home

Re: [Freeciv-Dev] Serious Suggestions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Serious Suggestions
From: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: 23 Feb 1999 16:25:53 +0100

>>>>> "Schaefer" == Schaefer Frank R <fschaef@xxxxxxxxxxxxxxx> writes:
    Schaefer>     Enable Users to define a plan for constructions, so
    Schaefer> that you could say for example:

    Schaefer>             1) Build 3 Archers; 2) Build Granary; 3)
    Schaefer> Build City-Walls;

    Schaefer>     In later version, this could be done like a little
    Schaefer> programming language so that one could write something
    Schaefer> like

    Schaefer>             OnEvent( Science(Monotheism) ) { if( !
    Schaefer> Wonder(JS-Bach) ) Build JS-Bach; }

I have also considered this recently. I think using a "real" language
for this is a bit overkill. I considered a simple language with some
predefined predicates like:

defenders < 2 : Riflemen
food_surplus > 2 : Settlers
!have(Great Wall) && size >= 4 : City Walls
size >= 7 : Aqueduct
production > 8 : JS-Bach

which would be just parsed from the top till the first is true. This
could be easily made with lex & yacc. Also, a GUI could be simply made 
that produces this output.

Checks if it is already there or can't be build are unnecessary IMHO,
if it can't be build, the next is taken.

I have a little experience with lex and yacc, so I could try this.

        Falk


[Prev in Thread] Current Thread [Next in Thread]