DELTA 25732 3162 5903
SVN  8hdy }  A H G r A d G g A  LtS G D A ( G i A  G  -v `  E?V K7R aWReturns TRUE iff the target_tile is seen by pow_player.
*********/
static bool is_tile_seen(const struct player *pow_player,
                         const struct tile *target_tile)
{
  return tile_get_known(target_tile, pow_player) == TILE_KNOWN_SEEN;
}

****
  Returns TRUE iff the target_tile it self and all tiles cardinally
  adjacent to it are seen by pow_player.
*********/
static bool is_tile_seen_cadj(const struct player *pow_player,
                              const struct tile *target_tile)
{
  /* The tile it self is unseen. */
  if (!is_tile_seen(pow_player, target_tile)) {
    return FALSE;
  }

  /* A cardinally adjacent tile is unseen. */
  cardinal_adjc_iterate(target_tile, ptile) {
    if (!is_tile_seen(pow_player, ptile)) {
      return FALSE;
    }
  } cardinal_adjc_iterate_end;

  /* They are all seen. */
  return TRUE;
}

****
  Returns TRUE iff the target_tile it self and all tiles adjacent to it
  are seen by pow_player.
*********/
static bool is_tile_seen_adjtile *target_tile)
{
  /* The tile it self is unseen. */
  if (!is_tile_seen(pow_player, target_tile)) {
    return FALSE;
  }

  /* An adjacent tile is unseen. */
  adjc_iterate(target_tile, ptile) {
    if (!is_tile_seen(pow_player, ptile)) {
      return FALSE;
    }
  } adjc_iterate_end;

  /* They are all seen. */
  return TRUE;
}

****
  Returns TRUE iff all tiles of a city are seen by pow_player.
*********/
static bool is_tile_seen_city(const struct player *pow_player,
                              const struct city *target_city)
{
  /* Don't know the city radius. */
  if (!can_player_see_city_internals(pow_player, target_city)) {
    return FALSE;
  }

  /* A tile of the city is unseen */
  city_tile_iterate(city_map_radius_sq_get(target_city),
                    city_tile(target_city), ptile) {
    if (!is_tile_seen(pow_player, ptile)) {
      return FALSE;
    }
  } city_tile_iterate_end;

  /* They are all seen. */
  return TRUE;
}

****
  Returns TRUE iff all tiles of a city an all tiles of its trade partners
  are seen by pow_player.
*********/
static bool is_tile_seen_traderoute(const struct player *pow_player,
                                    const struct city *target_city)
{
  /* Don't know who the trade routes will go to. */
  if (!can_player_see_city_internals(pow_player, target_city)) {
    return FALSE;
  }

  /* A tile of the city is unseen */
  if (!is_tile_seen_city(pow_player, target_city)) {
    return FALSE;
  }

  /* A tile of a trade parter is unseen */
  trade_routes_iterate(target_city, trade_partner) {
    if (!is_tile_seen_city(pow_player, trade_partner)) {
      return FALSE;
    }
  } trade_routes_iterate_end;

  /* They are all seen. */
  return TRUE;
}

case USP_TRANSP_DEPif (req->source.kind == VUT_TERRAIN
      || req->source.kind == VUT_TERRFLAG
      || req->source.kind == VUT_TERRAINCLASS
      || req->source.kind == VUT_RESOURCE
      || req->source.kind == VUT_EXTRA
      || req->source.kind == VUT_BASEFLAG
      || req->source.kind == VUT_BASEFLAGis_tile_seen(pow_player, target_tile);
    case REQ_RANGE_CADJACENT:
      /* TODO: The answer is known when the universal is located on a seen
       * tile. Is returning TRUE in those cases worth the added complexity
       * and the extra work for the computer? */
      return is_tile_seen_cadj(pow_player, target_tile);
    case REQ_RANGE_ADJACENT:
      /* TODO: The answer is known when the universal is located on a seen
       * tile. Is returning TRUE in those cases worth the added complexity
       * and the extra work for the computer? */
      return is_tile_seen_adj(pow_player, target_tile);
    case REQ_RANGE_CITY:
      /* TODO: The answer is known when the universal is located on a seen
       * tile. Is returning TRUE in those cases worth the added complexity
       * and the extra work for the computer? */
      return is_tile_seen_city(pow_player, target_city);
    case REQ_RANGE_TRADEROUTE:
      /* TODO: The answer is known when the universal is located on a seen
       * tile. Is returning TRUE in those cases worth the added complexity
       * and the extra work for the computer? */
      return is_tile_seen_traderoute(pow_player, target_city);
    case REQ_RANGE_CONTINENT:
    case REQ_RANGE_PLAYERWORLD:
    case REQ_RANGE_COUNT:
      /* Non existing range for requirement typesENDREP
id: siq.5ck.r25748/4486
type: file
pred: siq.5ck.r25746/169900
count: 18
text: 25748 0 4457 16104 a2042c9ae05aaefccf05682b1e3ae801
cpath: /trunk/common/metaknowledge.c
copyroot: 15280 /trunk

PLAIN
K 11
Makefile.am
V 23
file 5h.5ck.r25189/4645
K 14
achievements.c
V 24
file qhc.5ck.r25664/1903
K 14
achievements.h
V 25
file qhe.5ck.r25535/74568
K 9
actions.c
V 24
file r7a.5ck.r25740/5653
K 9
actions.h
V 25
file r7c.5ck.r25727/65299
K 4
ai.c
V 25
file 4go.5ck.r22382/18940
K 4
ai.h
V 24
file 4gp.5ck.r25486/1823
K 6
aicore
V 24
dir 18t.5ck.r25730/16258
K 6
base.c
V 26
file 3jw.5ck.r25382/100525
K 6
base.h
V 25
file 3jx.5ck.r24158/73597
K 9
borders.c
V 22
file 4f0.5ck.r25016/63
K 9
borders.h
V 25
file 4f1.5ck.r18858/99721
K 10
calendar.c
V 26
file 147p.5ck.r25063/58554
K 10
calendar.h
V 26
file 147r.5ck.r25063/58902
K 8
capstr.c
V 22
file dv.5ck.r24976/289
K 8
capstr.h
V 24
file dw.5ck.r18858/97074
K 10
citizens.c
V 24
file 6mx.5ck.r20853/5961
K 10
citizens.h
V 24
file 6my.5ck.r20853/6145
K 6
city.c
V 22
file q.5ck.r25747/2865
K 6
city.h
V 23
file 3q.5ck.r25538/5449
K 13
clientutils.c
V 24
file zj9.5ck.r24459/7375
K 13
clientutils.h
V 24
file zjb.5ck.r24459/7536
K 8
combat.c
V 24
file wp.5ck.r25730/15155
K 8
combat.h
V 24
file wq.5ck.r24573/25814
K 12
connection.c
V 22
file un.5ck.r25722/179
K 12
connection.h
V 24
file uo.5ck.r22458/34945
K 9
culture.c
V 25
file 104t.5ck.r25736/2351
K 9
culture.h
V 25
file 104v.5ck.r25736/2536
K 8
dataio.c
V 23
file 15r.5ck.r23908/582
K 8
dataio.h
V 25
file 15s.5ck.r23422/59337
K 11
diptreaty.c
V 22
file 3r.5ck.r24570/203
K 11
diptreaty.h
V 24
file 3s.5ck.r22430/33000
K 10
disaster.c
V 24
file b2m.5ck.r25554/6385
K 10
disaster.h
V 24
file b2o.5ck.r25554/5326
K 9
effects.c
V 25
file 2eo.5ck.r25743/10097
K 9
effects.h
V 25
file 2ep.5ck.r25743/10342
K 8
events.c
V 24
file 33h.5ck.r23572/7042
K 8
events.h
V 23
file 3t.5ck.r23572/7281
K 8
extras.c
V 25
file o9u.5ck.r25382/96566
K 8
extras.h
V 23
file o9w.5ck.r24840/728
K 12
fc_cmdhelp.c
V 24
file 76j.5ck.r20867/6570
K 12
fc_cmdhelp.h
V 23
file 76k.5ck.r23663/127
K 14
fc_interface.c
V 24
file 4up.5ck.r22631/8528
K 14
fc_interface.h
V 24
file 4uq.5ck.r23325/4181
K 10
fc_types.h
V 26
file 2ll.5ck.r25746/169399
K 15
featured_text.c
V 24
file 4h3.5ck.r24895/9815
K 15
featured_text.h
V 25
file 4h4.5ck.r24895/10009
K 6
game.c
V 23
file 3u.5ck.r25578/2881
K 6
game.h
V 24
file 3v.5ck.r25087/86845
K 19
generate_packets.py
V 24
file 2f4.5ck.r25010/6739
K 12
government.c
V 25
file he.5ck.r25382/101248
K 12
government.h
V 24
file hf.5ck.r25151/83855
K 6
idex.c
V 24
file qo.5ck.r25151/84101
K 6
idex.h
V 24
file qp.5ck.r18858/92434
K 13
improvement.c
V 23
file vb.5ck.r25743/9610
K 13
improvement.h
V 23
file vc.5ck.r25743/9856
K 5
map.c
V 23
file r.5ck.r25468/32860
K 5
map.h
V 22
file 41.5ck.r25652/392
K 8
mapimg.c
V 25
file 6n9.5ck.r25063/58715
K 8
mapimg.h
V 24
file 6na.5ck.r22508/1884
K 15
metaknowledge.c
V 24
file siq.5ck.r25748/4486
K 15
metaknowledge.h
V 25
file sis.5ck.r24569/17110
K 10
movement.c
V 25
file 2xv.5ck.r25713/18376
K 10
movement.h
V 25
file 2xw.5ck.r25713/18625
K 18
name_translation.h
V 25
file 4k1.5ck.r25037/17771
K 8
nation.c
V 24
file il.5ck.r25338/19579
K 8
nation.h
V 24
file im.5ck.r25338/19823
K 9
packets.c
V 24
file 43.5ck.r23778/20942
K 11
packets.def
V 24
file 2f5.5ck.r25720/7590
K 9
packets.h
V 24
file 44.5ck.r24891/13981
K 8
player.c
V 24
file 45.5ck.r25697/28786
K 8
player.h
V 23
file 46.5ck.r25720/7348
K 14
requirements.c
V 26
file 2wq.5ck.r25746/169647
K 14
requirements.h
V 24
file 2wr.5ck.r25741/6424
K 10
research.c
V 25
file 4ro.5ck.r25721/13867
K 10
research.h
V 25
file 4rp.5ck.r25721/14055
K 10
rgbcolor.c
V 25
file 6i6.5ck.r21333/48710
K 10
rgbcolor.h
V 25
file 6i7.5ck.r21333/48896
K 6
road.c
V 25
file 6pq.5ck.r25409/15669
K 6
road.h
V 25
file 6pr.5ck.r25409/15855
K 10
scriptcore
V 23
dir 75a.5ck.r25707/1973
K 11
spaceship.c
V 24
file 98.5ck.r23422/59826
K 11
spaceship.h
V 24
file 99.5ck.r23422/60070
K 12
specialist.c
V 23
file 33f.5ck.r22372/258
K 12
specialist.h
V 25
file 33g.5ck.r23560/15220
K 7
style.c
V 25
file zzb.5ck.r25382/99147
K 7
style.h
V 24
file zzd.5ck.r24742/9559
K 6
team.c
V 26
file 33i.5ck.r19259/396899
K 6
team.h
V 25
file 33j.5ck.r18858/94759
K 6
tech.c
V 23
file t.5ck.r25721/14242
K 6
tech.h
V 23
file u.5ck.r25721/14480
K 9
terrain.c
V 24
file 2fp.5ck.r24785/6224
K 9
terrain.h
V 24
file qs.5ck.r24693/11029
K 6
tile.c
V 24
file 2ys.5ck.r24537/2234
K 6
tile.h
V 25
file 2yt.5ck.r25151/83618
K 13
traderoutes.c
V 25
file bf8.5ck.r24649/19011
K 13
traderoutes.h
V 25
file bfa.5ck.r24649/19203
K 8
traits.h
V 25
file 7k3.5ck.r24972/68348
K 6
unit.c
V 21
file v.5ck.r25718/120
K 6
unit.h
V 24
file 48.5ck.r25715/13628
K 10
unitlist.c
V 24
file 39m.5ck.r23624/4825
K 10
unitlist.h
V 24
file 39n.5ck.r24112/3056
K 10
unittype.c
V 24
file v9.5ck.r25551/14764
K 10
unittype.h
V 23
file va.5ck.r25716/2702
K 9
version.c
V 23
file oe.5ck.r25677/9188
K 9
version.h
V 23
file e7.5ck.r24297/6940
K 9
victory.c
V 24
file qex.5ck.r23119/2099
K 9
victory.h
V 24
file qez.5ck.r23119/2255
K 8
vision.c
V 26
file 4dm.5ck.r19259/404222
K 8
vision.h
V 24
file 4dn.5ck.r24742/9986
K 12
workertask.c
V 24
file llw.5ck.r22482/3617
K 12
workertask.h
V 25
file lly.5ck.r23027/52794
K 10
worklist.c
V 25
file o8.5ck.r19259/402799
K 10
worklist.h
V 24
file o9.5ck.r18858/98299
END
ENDREP
id: p.5ck.r25748/9840
type: dir
pred: p.5ck.r25747/8268
count: 3899
text: 25748 4678 5149 5149 dd2451fee2ae2577045b06341f8b91f3
props: 23743 0 112 0 b2bc91bf125d83375389d51f25ff2c2f
cpath: /trunk/common
copyroot: 15280 /trunk

PLAIN
K 9
ABOUT-NLS
V 24
file fu.5ck.r23462/85000
K 7
AUTHORS
V 24
file 5u.5ck.r22143/14016
K 7
COPYING
V 19
file 1h.0.r9643/400
K 9
ChangeLog
V 26
file 6l.5ck.r22811/6091752
K 7
INSTALL
V 22
file 6.5ck.r24055/8187
K 11
Makefile.am
V 21
file 59.5ck.r25734/77
K 4
NEWS
V 24
file 6m.5ck.r25634/30702
K 6
README
V 20
file 7.0.r4421/96382
K 2
ai
V 21
dir 8.5ck.r25744/3734
K 10
autogen.sh
V 23
file 12o.5ck.r24091/228
K 9
bootstrap
V 23
dir 2p5.5ck.r25677/8222
K 6
client
V 23
dir d.5ck.r25746/186896
K 6
common
V 21
dir p.5ck.r25748/9840
K 12
configure.ac
V 24
file 149.5ck.r25725/7109
K 4
data
V 22
dir w.5ck.r25726/13022
K 12
dependencies
V 23
dir 2yu.5ck.r25594/4225
K 11
diff_ignore
V 23
file qq.5ck.r24665/2850
K 3
doc
V 23
dir k7.5ck.r25747/10625
K 10
fc_version
V 25
file 2lo.5en.r25736/11066
K 2
m4
V 23
dir 12p.5ck.r25725/3564
K 7
scripts
V 22
dir 2yo.5ck.r24495/862
K 6
server
V 22
dir z.5ck.r25747/15484
K 5
tests
V 22
dir 2g9.5ck.r25379/673
K 5
tools
V 23
dir 4pj.5js.r25729/2748
K 12
translations
V 23
dir t0a.5ck.r25677/8953
K 7
utility
V 22
dir 1c.5ck.r25725/6878
K 3
vms
V 25
dir u9.5ck.r21528/1396085
K 5
win32
V 23
dir 2eu.5ck.r25498/1618
END
ENDREP
id: 3.5ck.r25748/11232
type: dir
pred: 3.5ck.r25747/16882
count: 17874
text: 25748 10067 1152 1152 8214399914b95369673f959d9c81bfb7
props: 23244 4830 282 0 e4bb46e81629a60eef613b169b23a9ea
cpath: /trunk
copyroot: 15280 /trunk

PLAIN
K 8
branches
V 19
dir 1.0.r25731/8997
K 4
tags
V 19
dir 2.0.r25639/6939
K 5
trunk
V 22
dir 3.5ck.r25748/11232
K 7
website
V 21
dir 3ge.0.r22980/2263
END
ENDREP
id: 0.0.r25748/11625
type: dir
pred: 0.0.r25747/17276
count: 25748
text: 25748 11459 153 153 2d233bfe28d8134b945d2e283e86d6c8
cpath: /
copyroot: 0 /

siq.5ck.t25747-1 modify true false /trunk/common/metaknowledge.c


11625 11775
