For d = 1 To 100 'for all values in the array
board(d) = 0 'turn them into 0
Next d 'complete initialisation of array
no_of_snakes = 10 'the number of snakes = 10
no_of_ladders = 10 'the number of ladders = 10
snakecount = 0 'set snake counter to 0
Do Until snakecount = no_of_snakes
Do
size_of_snake = InputBox("Enter size of snake between 10 and 30 for snake number " & snakecount + 1)
If size_of_snake < 10 Or size_of_snake > 30 Then
MsgBox ("The size of the snake has to be between 10 and 30, please retry")
End If
Loop Until size_of_snake > 9 And size_of_snake < 31
Do
position_of_snake = InputBox("Enter start position of snake for snake number " & snakecount + 1)
If position_of_snake < 11 Or position_of_snake > 99 Then
MsgBox ("Invalid position, try again")
End If
Loop Until position_of_snake > 10 And position_of_snake < 100
[COLOR=Orange]board(position_of_snake) = size_of_snake * -1[/COLOR]
snakecount = snakecount + 1
Loop