[Freeciv-Dev] Re: [PATCH] new moving type: unknown (PR#1316)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, Mar 16, 2002 at 09:43:36AM +0200, Markus Linnala wrote:
> Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> writes:
>
> > On Sun, Mar 10, 2002 at 08:33:24AM -0800, Markus Linnala wrote:
> > >
> > > New moving type type unknown. Use it instead of 0.
> >
> > No. Instead add a flag "bool accept_any_move_type" to
> > ai_choose_defender_limited.
>
> Use ANY_MOVING when we don't care. Use UNKNOWN_MOVING whe we
> don't know. Add flag "bool accept_any_move_type" to
> ai_choose_defender_limited.
> Reason to use symbolic values instead of 0's is that 0's are not
> part of "enum unit_move_type".
I know.
The patch is even more wrong:
- two enum names with the same value
- ai_choose_defender_limited get the information double (via the move
type and the flag)
- I'm against adding any move type just for this function. I agree
that there no neutral element in enum unit_move_type which can be
used like NULL for pointers.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Python is executable pseudocode. Perl is executable line noise"
-- Bruce Eckel
|
|