Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Sub EvaluaJugadaMov(tablero As ClassTablero, jugador As Integer) As Integer
- Dim valor_jugada, valor As Integer
- Dim n2, n3, n4 As Integer
- Dim j2, j3, j4 As Integer
- Dim eva As Integer[]
- eva = tablero.comprueba_linea(4, jugador)
- n4 = eva[1]
- j4 = eva[0]
- If n4 = 0 Then
- 'mejora de rendimiento (version 0.0.4),
- eva = tablero.comprueba_linea(2, jugador)
- n2 = eva[1]
- j2 = eva[0]
- eva = tablero.comprueba_linea(3, jugador)
- n3 = eva[1]
- j3 = eva[0]
- Endif
- valor_jugada = (4 * n2 + 9 * n3 + 100000 * n4)
- Return valor_jugada
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement