Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 27-03-2013
Neg90 Neg90 is offline
Miembro
NULL
 
Registrado: mar 2013
Posts: 29
Poder: 0
Neg90 Va por buen camino
Problema uso de tag

Buenas, ando en busca de ayuda. Estoy haciendo un TATETI entre dos jugadores humanos, y me surgió un problema al momento de verificar quien gana. el código es este ..

Código Delphi [-]
begin
   aux:= aux+1;
   if (aux mod 2 <> 0) then
     begin
       (sender as timage).picture:= form2.image1.Picture;
       (sender as timage).enabled:= false;
       if tag = 1 then
         matriz[1,1]:= 1
       else
         if tag = 1  then
           matriz[1,2]:=1
         else
           if tag =3 then
             matriz[1,3]:=1
           else
             if tag = 4 then
               matriz[2,1]:=1
             else
               if tag = 5 then
                 matriz[2,2]:=1
               else
                 if tag = 6 then
                   matriz[2,3]:=1
                 else
                   if tag = 7 then
                     matriz[3,1]:= 1
                   else
                     if tag = 8 then
                       matriz[3,2]:=1
                     else
                       matriz[3,3]:=1;

       for i:=8 to  248 do
         begin
           sleep(1);
           refresh;
           shape1.top:=i;
         end;
     end
   else
     begin
       (sender as timage).picture:= form2.image2.Picture;
       (sender as timage).enabled:= false;
       if tag = 1 then
         showmessage('Hola')
       else
         if tag = 2 then
           matriz[1,2]:=2
         else
           if tag =3 then
             matriz[1,3]:=2
           else
             if tag = 4 then
               matriz[2,1]:=2
             else
               if tag = 5 then
                 matriz[2,2]:=2
               else
                 if tag = 6 then
                   matriz[2,3]:=2
                 else
                   if tag = 7 then
                     matriz[3,1]:= 2
                   else
                     if tag = 8 then
                       matriz[3,2]:=2
                     else
                       matriz[3,3]:=2;
       for i := 248 downto 8 do
         begin
           sleep(1);
           refresh;
           shape1.Top:=i;
         end;


     end;
end;

tengo 9 imágenes y cada ves que uno de los jugadores hace click en una de las imágenes en teoría carga un valor en la matriz, 1 si es el jugador 1 o 2 si es el jugador 2. Lo que había hecho es ponerle a cada una de las imágenes ponerle un tag de 1 a 9, pero me di cuenta de que el problema esta en que no cargo la matriz con ningún valor. Gracias de antemano.

Pd: el cartel de hola esta de mas pero era para ver si me cargaba la matriz .
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 19:05:11.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi