Autor Beitrag
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Mi 09.04.03 16:53 
Hallo,
ich habe da irgenwo ein denk fehler gemacht aber ich finde ihn einfach nicht:
ausblenden volle Höhe Quelltext
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:
procedure VisibleStein(px,py:Integer);
var
  x,y,OldType:Integer;
  Raus,R1,R2,R3,R4:Bool;
begin
  Raus:=True; R1:=True; R2:=True; R3:=True; R4:=True;
  OldType:=Game.Karte[px,py].typ;
  
  repeat
    das geht
    for x:=px to MapX do begin
      if (Game.karte[x,py].Typ = OldType) and (R1 = True) then begin
        Game.karte[x,py].Typ:=None;
        Game.karte[x,py].Visible:=False;
      end
      else
        R1:=False;
    end;
    // das geht
    for x:=px-1 downto 0 do begin
      if (Game.karte[x,py].Typ = OldType) and (R2 = True) then begin
        Game.karte[x,py].Typ:=None;
        Game.karte[x,py].Visible:=False;
      end
      else
        R2:=False;
    end;

   // das geht nicht
   for y:=py to MapY do begin
      if (Game.karte[px,y].Typ = OldType) and (R3 = True) then begin
        Game.karte[px,y].Typ:=None;
        Game.karte[px,y].Visible:=False;
      end
      else
        R3:=False;
    end;
    // das geht
    for y:=py-1 downto 0 do begin
      if (Game.karte[px,y].Typ = OldType) and (R4 = True) then begin
        Game.karte[px,y].Typ:=None;
        Game.karte[px,y].Visible:=False;
      end
      else
        R4:=False;
    end;

    // und das geht auch
    Raus:=R1 and R2 and R3 and R4;
  until Raus = False;
end;

kann mir jemmand bitte sagen wo der Fehler ist ?

Moderiert von user profile iconAya: Titel geändert.

_________________
MFG
Michael Springwald, "kann kein englisch...."
CenBells
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1547

Win 7
Delphi XE5 Pro
BeitragVerfasst: Mi 09.04.03 17:00 
was soll denn dabei passieren? Und was passiert?
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Mi 09.04.03 17:03 
er soll alle umliegende fehlder von typ entfernen... ich will sowas wie Clickkis schreiben wenn es jemmand kennt ;)

_________________
MFG
Michael Springwald, "kann kein englisch...."
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Mi 09.04.03 17:18 
wenn ich die fehlerhafte zeile nach oben kopiere geht es aber dafür funktioniert dann R1 nicht mehr warum ?
ich verstehe es einfach nicht :( :(

_________________
MFG
Michael Springwald, "kann kein englisch...."
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Mi 09.04.03 20:06 
In Freewarebereich hab ich das KlickTris. Guck wie ich das gemacht habe. Vielleicht bringt das neue Ideen.

_________________
Popov
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Mi 09.04.03 21:02 
davon habe ich ja die idee ;)

_________________
MFG
Michael Springwald, "kann kein englisch...."
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: So 15.06.03 14:23 
kann mir hier keiner helfen ?

_________________
MFG
Michael Springwald, "kann kein englisch...."