In the game there are either 1 player or 2 players. When there is only 1 player then I want the ball colors to switch colors back and forth so when it is white's turn then white balls are on the board and when it is black's turn then black balls are on the board.
ShowBalls is a Function
Const White = 1 and Const Black = 2
Variable BallColor toggles the player's color each pass through PlaceBallOnSquare
The following works:
....but this does not work:
1st time through BallColor = White, 2nd time through BallColor = Black
The ball colors do not change from white to black on 1st time
ShowBalls is a Function
Const White = 1 and Const Black = 2
Variable BallColor toggles the player's color each pass through PlaceBallOnSquare
The following works:
Code:
Private Sub PlaceBallOnSquare()
'
'
If BallColor = White Then
If Players = 1 Then ShowBalls Black
Else
If Players = 1 Then ShowBalls White
End If
'
'
End Sub
....but this does not work:
1st time through BallColor = White, 2nd time through BallColor = Black
The ball colors do not change from white to black on 1st time
Code:
'
'
IIf BallColor = White And Players = 1, ShowBalls(Black), ShowBalls(White)
'
'