[Freeciv-Dev] Re: Cleaning up gotohand.c
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, Sep 18, 2001 at 01:28:41PM +0100, Gregory Berkolaiko wrote:
> To reduce the time taken by warmap generation and improve the quality of
> the warmap I am undertaking an effort to implement the suggestion given
> in the comment to really_generate_warmap
> http://www.freeciv.org/lxr/source/server/gotohand.c?v=cvs#L261
>
> I would like to divide the warmap generation into several subfunctions
> which could be called in, say, ai_find_someplace_to_go
>
> warmap_initialize(...);
> while (warmap_next_position(&x, &y)) {
> ...
> if (evaluate_position(x,y))
> warmap_process_position(x,y);
> if (found_someplace_to_go(x,y))
> break;
> }
>
> This might increase volume of the code, but will make it neater, for
> sure.
Can you describe what the methods in your small sample do? Especially
warmap_next_position.
> But this is the aim. For now I am proposing a verrrrry small patch.
> Just some surface cleaning. The function init_gotomap just calls
> init_warmap and thus is unnecessary.
Looks sane to me.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Are you saying that you actually used the Classpath Java AWT classes in
addition to the GTK peers and got them to display something?
Wow. That's way better than I did and I wrote the code!"
-- Aaron M. Renn in the classpath mailing list
- [Freeciv-Dev] Cleaning up gotohand.c, Gregory Berkolaiko, 2001/09/18
- [Freeciv-Dev] Re: Cleaning up gotohand.c,
Raimar Falke <=
- [Freeciv-Dev] Re: Cleaning up gotohand.c, Gregory Berkolaiko, 2001/09/18
- [Freeciv-Dev] Re: Cleaning up gotohand.c, Raimar Falke, 2001/09/19
- [Freeciv-Dev] Re: Cleaning up gotohand.c, Gregory Berkolaiko, 2001/09/19
- [Freeciv-Dev] Re: Cleaning up gotohand.c, Raimar Falke, 2001/09/19
- [Freeciv-Dev] Re: Cleaning up gotohand.c, Gregory Berkolaiko, 2001/09/20
- [Freeciv-Dev] Re: Cleaning up gotohand.c, Raimar Falke, 2001/09/20
|
|