Complete.Org: Mailing Lists: Archives: freeciv-ai: December 2002:
[freeciv-ai] Re: patch/rfc: wrap activity
Home

[freeciv-ai] Re: patch/rfc: wrap activity

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: patch/rfc: wrap activity
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Mon, 2 Dec 2002 23:17:16 +0000 (GMT)

On Mon, 2 Dec 2002, Gregory Berkolaiko wrote:
> Three comments:
>
> 1. could_be_my_zoc is a really dopey function, I am not sure I understand
> it and what it's consequences are...It would make sense if it was
> checking if the tile we intend to go to is occupied -- that would mean we
> are attacking which is ok.But I don't think it does that...

I also have no idea. Note that for this patch that does not matter, since
we only add usage to the 0 and 1 cases, that do not involve this strange
function.

> 2. Raimar would object to your treating returned int as a bool.

I've made them proper tests.

> 3. In
> -      if (!can_unit_move_to_tile(punit, x1, y1, FALSE))
> +      if (could_unit_move_to_tile(punit, x1, y1)) {
>          continue;
> +      }
> I think you forgot "== 0" in the condition.

Yep.

New patch attached.

  - Per

Attachment: activityfix2.diff
Description: Text document


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