Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turing connect four
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Rodzy




PostPosted: 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

Turing:


<Add your code here>



Please specify what version of Turing you are using
<Answer Here>



Connect+Four.t
 Description:

Download
 Filename:  Connect+Four.t
 Filesize:  19.3 KB
 Downloaded:  167 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Rodzy




PostPosted: 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

Turing:


<Add your code here>



Please specify what version of Turing you are using
<Answer Here>
Insectoid




PostPosted: 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.
Rodzy




PostPosted: 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?
Insectoid




PostPosted: Tue Jan 26, 2016 6:03 pm   Post subject: RE:Turing connect four

Wherever you want to check for a win.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: