[Freeciv-Dev] Re: Some ideas + one patch + libreadline
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, Jan 30, 2000 at 08:28:46AM -0500, Jeff Mallatt wrote:
> At 2000/01/30 08:10 , Tomasz Wegrzanowski wrote:
> >3) Despotism is very underbalanced. What about changing its penalities
> > barieer from 2 to 3 ? (Anarchy also ?)
> >
> >4) Republic/Democracy are very overfeatured w/o Senate. Some
> > alternative kind of Senate should be set if we have no diplomacy.
> > Twice as much shields/turn upkeep for military units ? (all units ?)
>
> We should implement the Senate! And, a simple one should be fairly easy to
> do.
Would be simple if freeciv were single-player.
What would Senate do if there is no peace/cease-of-fire ?
Or who can implement diplomacy for AI ?
BTW : I have just made a perl wraper over civserver to use readline.
civserver is much better with it.
Legaleeze at start is simply Debian's standard.
*** START civserver_readline ***
#!/usr/bin/perl -w
# Wraper over civserver to use readline facilites
# Copyright (c) 2000 Tomasz Węgrzanowski <maniek@xxxxxxxx>
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# On Debian GNU/Linux systems, the complete text of the GNU General
# Public License can be found in `/usr/share/common-licenses/GPL'.
use Term::ReadLine;
use IPC::Open3;
pipe CS_W,CS_E;
open3 \*CS_W,\*CS_E,\*CS_E,"civserver @ARGV >&2";
$SIG{'INT'} = \&finish;
my $term = new Term::ReadLine 'Freciv server';
my $prompt = 'freeciv> ';
while (1) {
$read = sysread (CS_E,$ans,256);
exit unless ($read);
READMORE:
if ($ans =~ /\n>\s$/ ) {
$ans =~ s/>\s$//;
print $ans;
my $cmd = $term->readline($prompt);
print CS_W $cmd,"\n";
}
else {
if ($ans =~ /\n>?$/ ) {
my $readcont = sysread (CS_E,$anscont,256);
exit unless ($readcont);
$ans .= $anscont;
goto READMORE;
}
print $ans;
}
}
sub finish {
print "Exiting at user's request\n";
print CS_W "quit\n";
close CS_W;
exit;
}
**** END ****
|
|