Computer Science Canada Turing connect four |
Author: | Rodzy [ Tue Jan 26, 2016 11:09 am ] | ||
Post subject: | Turing connect four | ||
What is it you are trying to achieve? <Replace all the <> with your answers/code and remove the <>> What is the problem you are having? <Answer Here> Describe what you have tried to solve this problem <Answer Here> Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here> How would I use a 2D Array to check if there are 4 circles in a line horizontally, vertically and diagonal
Please specify what version of Turing you are using <Answer Here> |
Author: | Rodzy [ Tue Jan 26, 2016 11:12 am ] | ||
Post subject: | Re: Turing connect four | ||
Rodzy @ Tue Jan 26, 2016 11:09 am wrote: What is it you are trying to achieve?
Correctly checking if 4 cricles in a row has been achieved Describe what you have tried to solve this problem Using if statements but that would take forever Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) Attached How would I use a 2D Array to check if there are 4 circles in a line horizontally, vertically and diagonal
Please specify what version of Turing you are using <Answer Here> |
Author: | Insectoid [ Tue Jan 26, 2016 1:09 pm ] |
Post subject: | RE:Turing connect four |
For loops. You can use nested for loops to iterate over every row, column and diagonal. |
Author: | Rodzy [ Tue Jan 26, 2016 1:18 pm ] |
Post subject: | Re: RE:Turing connect four |
Insectoid @ Tue Jan 26, 2016 1:09 pm wrote: For loops. You can use nested for loops to iterate over every row, column and diagonal.
Where exactly would I integrate them into my program? |
Author: | Insectoid [ Tue Jan 26, 2016 6:03 pm ] |
Post subject: | RE:Turing connect four |
Wherever you want to check for a win. |