[Freeciv-Dev] Re: directional system: more magic code cleanups
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, Sep 29, 2001 at 02:21:25AM -0400, Ross W. Wetmore wrote:
> Ok, here is a slight refinement of your proposal in pseudocode form.
>
> (It is disgusting how easily I can be sucked into an intriguing puzzle :-).
>
> 0) Fix straightest_dir() according to the current (exact) algorithm for
> determining a direction at a given point. It has nothing to do with
> lines and is useful for what it does, so you certainly don't want to
> (ab)use its signature.
>
> 1) Add a (pointer to) struct goto_block to the unit struct or wherever
> int count; /* total count remaining */
s/count/steps/ or s/count/num_steps/ ?!
> 2) Define a new function straightest_line_init() like this
> 3) Define a new function straightest_line_next() like this
> This is more like a LINE_STEP() algorithm, but I think that is what
> you were looking for.
Yes. Something like this.
> But as you can see, its semantics and use are really quite different
> from straightest_direction().
We don't need straightest_direction anymore.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"If at first you don't succeed... well so much for skydiving."
- [Freeciv-Dev] Re: directional system: more magic code cleanups, (continued)
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Tony Stuckey, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/27
- [Freeciv-Dev] Trigonometry of Freeciv, Gregory Berkolaiko, 2001/09/27
- [Freeciv-Dev] Re: Trigonometry of Freeciv, Raimar Falke, 2001/09/27
- [Freeciv-Dev] Re: Trigonometry of Freeciv, Raahul Kumar, 2001/09/29
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/27
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/28
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/29
- [Freeciv-Dev] Re: directional system: more magic code cleanups,
Raimar Falke <=
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/30
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/17
- [Freeciv-Dev] Re: directional system: more magic codecleanups, Jason Dorje Short, 2001/09/18
- [Freeciv-Dev] Re: directional system: more magic codecleanups, Reinier Post, 2001/09/25
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Jason Dorje Short, 2001/09/17
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/17
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/17
|
|