I don’t understand this code can you explain me
grid is an int[][]
distbest is initialized
double distbest
int turn = 60;
if (g > 1)
this.grid = turn(distbest * turn).grid;
else
this.grid = turn(-distbest * turn).grid;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This section:
means that there’s a function
turnthat returns an object that containsgridthat takes a double as a parameter. What’s not shown in the code is the return type.Hence, what I can say, is that the function is declared something like
where
Grid(ficticious) has apublicattribute ofint[][] grid(that’s whyturn(distbest * turn).gridis possible).I’m basing all this from the sample code listed above. The other
turnis a parameter.