Purpose of the code


#1

def random_col(board):
return randint(0, len(board) -1)
def random_row(board):
return randint(0, len(board) -1)

THIS CODE WORKS FOR ME..BUT WHAT IS THE PURPOSE OF THIS CODE IN THIS GAME:

THANKYOU IN ADVANCE


#2

each function generates a random number, together this number will be the coordinates of where the ship is located on the board


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.