Guest User

Untitled

a guest
Mar 5th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. Private Sub tictactoe_horizontal(ByRef tableau() As String)
  2.  
  3. Dim i As Integer
  4. Dim j As Integer
  5. Dim val As String
  6.  
  7.  
  8.  
  9. For i = LBound(tableau, 1) To UBound(tableau, 1)
  10. For j = LBound(tableau, 2) To UBound(tableau, 2)
  11. val = tableau(i, j)
  12.  
  13. If tableau(i, j - 1) = val And tableau(i, j + 1) = val Then
  14. tictactoe_horizontal = val
  15. ElseIf j + 1 = UBound(tableau, 2) Then
  16. Call MsgBox(val)
  17. Else
  18. tictactoe_horizontal = " "
  19. End If
  20.  
  21. Next
  22. Next
  23.  
  24.  
  25. End Sub
Advertisement
Add Comment
Please, Sign In to add comment