document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. \' Gambas class file
  2.  
  3. Inherits ClassJugador
  4.  
  5. Public Function juega(tablero As ClassTablero, Optional ProducidoClick As Boolean[], Optional col As Integer[], Optional TextLabelmensajes As TextLabel, Optional area As TextArea) As ClassTablero
  6.   \'uso producidoclick y col para que pasen por referencia
  7.  
  8.   Dim ok As Boolean = False
  9.   Dim colorJugador As New Collection
  10.  
  11.   colorJugador.Add("Amarillo", "-1")
  12.   colorJugador.Add("Naranja", "1")
  13.   \'ProducidoClick = False
  14.   While Not ok
  15.     \'espero que se produza un click en el tablero...
  16.     If ProducidoClick[0] = True Then
  17.      
  18.       area.Text &= gb.CrLf & "Jugador: " & colorJugador[Str$(Super.numero)] & ", columna: " & Str$(col[0])
  19.       ok = tablero.insertaficha(col[0] - 1, Super.numero)
  20.       If OK = False Then
  21.         Print "Movimiento ilegal"
  22.         TextLabelMensajes.text = "Movimiento ilegal"
  23.         ProducidoClick[0] = False
  24.       Else
  25.         ProducidoClick[0] = False
  26.         Break
  27.       Endif
  28.       ProducidoClick[0] = False
  29.     Else
  30.       Wait 0.005
  31.     Endif
  32.    
  33.   Wend
  34.  
  35.   Return tablero
  36.  
  37. End
');