Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.
Public Shared Sub ShowIsValid(ByVal isTurn As Byte, ByRef isValid As Byte) Dim opponent As Char Dim player As Char If isTurn = 0 Then opponent = "o"c player = "x"c Else opponent = "x"c player = "o"c End If For row As Integer = 0 To 7 For col As Integer = 0 To 7 'is het veld niet leeg, For lus overslaan If Board.boardArray(row, col) <> " "c Then Exit For For rowDirection As Integer = -1 To 1 For colDirection As Integer = -1 To 1 If row + rowDirection < 0 Or _ row + rowDirection >= 7 Or _ col + colDirection < 0 Or _ col + colDirection >= 7 Or _ (rowDirection = 0 AndAlso colDirection = 0) Then Exit For If Board.boardArray(row + rowDirection, col + colDirection) = opponent Then x = row + rowDirection y = col + colDirection Do x += rowDirection y += colDirection If x < 0 Or x >= 7 Or y < 0 Or y >= 7 Then Exit Do If Board.boardArray(x, y) = " "c Then Exit Do If Board.boardArray(x, y) = player Then Board.boardArray(row, col) = "."c isValid += 1 Exit Do End If Loop End If Next Next Next Next End Sub Public Shared Sub resetShowValid() For i As Integer = 0 To 7 For j As Integer = 0 To 7 If Board.boardArray(i, j) = "." Then Board.boardArray(i, j) = " " End If Next Next End Sub End Class
|Visual Studio 2015 locks debug executable||9||91|
|Saving the SQL Login Credentials for Excel 2010 Microsoft Queries||1||45|
|An OLE registration error occurred. The program is not correctly installed. Run Setup again for the program. Outlook 2016, Windows 10||3||80|
|vb script Microsoft Word tables portion of based on bookmark, count and add rows||1||31|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
10 Experts available now in Live!