Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+6 votes

Iam stuck on the displayGame part and have created a nested for loop already. I have it so it reads where the x and o are suppose to go but not sure how I can call it so it draws x or o in the correct spot. Any tips would help, thanks.

asked in CSC201 Spring 2021 by (1 point)

3 Answers

+3 votes

Use if statement to call draw x if gamegrid contains x.

answered by (1.1k points)
0

Yep I have that. Iam just confused on how to call drawX or drawO.

+3 votes

Inside the nested loop, you will need the conditional statements in order to find out which shape to draw. Then, use the drawX or drawO functions to draw 'X' or 'O'.
Both drawX and drawO functions need 3 parameters which are rowNum, colNum, window. In order to draw 'X' or 'O' in the correct spot, you should find the correct variables to put in the parameters.

answered by (1 point)
+2 votes

It should just be drawX(row, col, window) or drawO(row, col, window)

answered by (1 point)
...