document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. \' Gambas class file
  2.  
  3. Public texto As String[]
  4. Public jugadores As Variant[]  
  5.  
  6. Public Sub Form_Open()
  7.  
  8.   ComboBoxDificultad1.Add(1)
  9.   ComboBoxDificultad1.Add(2)
  10.   ComboBoxDificultad1.Add(3)
  11.   ComboBoxDificultad1.Add(4)
  12.   ComboBoxDificultad2.Add(1)
  13.   ComboBoxDificultad2.Add(2)
  14.   ComboBoxDificultad2.Add(3)
  15.   ComboBoxDificultad2.Add(4)
  16.   ComboBoxJugador1.Add("Humano")
  17.   ComboBoxJugador1.Add("Ordenador")
  18.   ComboBoxJugador2.Add("Humano")
  19.   ComboBoxJugador2.Add("Ordenador")
  20.  
  21. End
  22.  
  23. Public Sub Button1_Click()
  24.  
  25.   If ComboBoxJugador1.Index = 0 Then
  26.     jugadores.Add(Object.New("ClassJugadorHumano"))
  27.     jugadores[0].profundidad = -100 \' es humano
  28.     texto.Add("El jugador 1 (amarillo) es Humano")
  29.   Else
  30.    
  31.     jugadores.Add(Object.New("ClassJugadorOrdenador"))
  32.     jugadores[0].profundidad = Val(ComboBoxDificultad1.text)
  33.     texto.Add("El jugador 1 (amarillo) es Ordenador, nivel: " & ComboBoxDificultad1.text)
  34.   Endif
  35.   If ComboBoxJugador2.Index = 0 Then
  36.     jugadores.Add(Object.New("ClassJugadorHumano"))
  37.     jugadores[1].profundidad = -100 \' es humano
  38.     texto[0] &= "<br>El jugador 2 (naranja) es Humano"
  39.   Else
  40.     jugadores.Add(Object.New("ClassJugadorOrdenador"))
  41.     jugadores[1].profundidad = Val(ComboBoxDificultad2.text)
  42.     texto[0] &= "<br>El jugador 2 (naranja) es Ordenador, nivel: " & ComboBoxDificultad2.text
  43.   Endif
  44.  
  45.   Me.Close()
  46.  
  47. End
  48.  
  49. Public Sub ComboBoxJugador2_Click()
  50.  
  51.   If ComboBoxJugador2.Index = 0 Then
  52.     ComboBoxDificultad2.Enabled = False
  53.   Else
  54.     ComboBoxDificultad2.Enabled = True
  55.   Endif
  56.  
  57. End
  58.  
  59. Public Sub ComboBoxJugador1_Click()
  60.  
  61.   If ComboBoxJugador1.Index = 0 Then
  62.     ComboBoxDificultad1.Enabled = False
  63.    
  64.   Else
  65.     ComboBoxDificultad1.Enabled = True
  66.   Endif
  67.  
  68. End
');