\' Gambas class file
Inherits ClassJugador
Public Function juega(tablero As ClassTablero, ProducidoClick As Boolean[], col As Integer[], TextLabelmensajes As TextLabel, area As TextArea) As ClassTablero
Dim devolucion As New Variant[]
Dim tablerotmp As ClassTablero
Dim jugada As Integer
Dim colorJugador As New Collection
Dim profundidadArbol As Integer[] = [3, 4, 5, 6]
colorJugador.Add("Amarillo", "-1")
colorJugador.Add("Naranja", "1")
tablerotmp = tablero.copia()
devolucion = ia.negamax(tablerotmp, Super.numero, profundidadArbol[Super.profundidad - 1], - main.maximoInteger - 1, main.maximoInteger)
jugada = devolucion[1]
area.Text &= gb.CrLf & "Jugador: " & colorJugador[Str$(Super.numero)] & ", columna: " & Str$(jugada + 1)
tablero.insertaficha(jugada, Super.numero)
Return tablero
End