Leser: 1
7 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
glob $sb{8}{8}="none"
$sb{1..8}{2}="wB"
($sb{1}{1}, $sb{8}{1})="wT";
($sb{2}{1}, $sb{7}{1})="wS";
($sb{3}{1}, $sb{6}{1})="wL"; #push(@Orte,$_);
$sb{4}{1}="wD";
$sb{5}{1})="wK";
$sb{1..8}{7}="sB";
($sb{1}{8}, $sb{8}{1})="sT";
($sb{2}{8}, $sb{7}{1})="sS";
($sb{3}{8}, $sb{6}{1})="sL";
$sb{4}{8}="sD";
$sb{5}{8})="sK";
for($i2=1; $i2 <= 8; $i2++;){
for($n2=1; $n2 <= 8 $n2++;){
$dings[$n2][$i2]="$n2 $i2";
}
}
#bauer
if (
$sb[$fx][$fy] == "wB" &&
($fy+1==$ty) || #normal
($fy==2 && $fy+2==$ty && $sb[$fy][3]!="w*") || #doppelsprung
($fy+1==$ty && $fx+(1||-1)==$tx && $sb[$tx][$ty]=="s*") #schlagen
#el passant kann nicht (korrekt) berücksichtigt werden, da spiel verlauf net gelogt wird
)
{MOVE; push(@bedrohte_felder, $dings[ty+1][$tx+1, $tx-1)]); exit;}
#springer
if (
$sb[$fx][$fy] == "wS" && #alle möglichen springer kombis
((($fx-1==$tx && $fy+2==$ty) || ($fx+1==$tx && $fy+2==$ty) || ($fx-1==$tx && $fy-2==$ty) || ($fx+1==$tx && $fy-2==$ty) || ($fx-2==$tx && $fy+1==$ty) || ($fx+2==$tx && $fy+1==$ty) || ($fx-2==$tx && $fy-1==$ty) || ($fx+2==$tx && $fy-1==$ty) )) && ($sb[$tx][$ty]!== "w*"))
)
{MOVE; push(@bedrohte_felder, $dings[$fx-1==$tx][$fy+2==$ty], $dings[$fx+1==$tx][$fy+2==$ty], $dings[$fx-1==$t][$fy-2==$ty], $dings[$fx+1==$tx], $dings$fy-2==$ty], $dings[$fx-2==$tx][$fy+1==$ty], $dings[$fx+2==$tx][$fy+1==$ty], $dings[$fx-2==$tx][$fy-1==$ty], $dings[$fx+2==$tx][$fy-1==$ty]; exit;}
sub MOVE{
$sb{$fx}{$fy} = $sb{$tx}{$ty}
$sb{$fx}{$fy} = "none"
}
sub PRINT{
for($i=1; $i <= 8; $i++;){
for($n=1; $n <= 8 $n++;)
{print "<a href=chess.pl?fx=$n&fy=$i#txty><img href=$sb{$n}{$i}.png width=61 heigth=60></a>"}
print "<br>"
}
}
$dings[$fx-1==$tx][$fy+2==$ty]
7 Einträge, 1 Seite |