\' Gambas class file
Inherits ClassJugador
Public Function juega(tablero As ClassTablero, Optional ProducidoClick As Boolean[], Optional col As Integer[], Optional TextLabelmensajes As TextLabel, Optional area As TextArea) As ClassTablero
\'uso producidoclick y col para que pasen por referencia
Dim ok As Boolean = False
Dim colorJugador As New Collection
colorJugador.Add("Amarillo", "-1")
colorJugador.Add("Naranja", "1")
\'ProducidoClick = False
While Not ok
\'espero que se produza un click en el tablero...
If ProducidoClick[0] = True Then
area.Text &= gb.CrLf & "Jugador: " & colorJugador[Str$(Super.numero)] & ", columna: " & Str$(col[0])
ok = tablero.insertaficha(col[0] - 1, Super.numero)
If OK = False Then
Print "Movimiento ilegal"
TextLabelMensajes.text = "Movimiento ilegal"
ProducidoClick[0] = False
Else
ProducidoClick[0] = False
Break
Endif
ProducidoClick[0] = False
Else
Wait 0.005
Endif
Wend
Return tablero
End