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

Username:   Password: 
 RegisterRegister   
 clear check method
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Velocity




PostPosted: Thu Jan 12, 2012 8:51 am   Post subject: clear check method

how do i make my program check if all bricks are clear on the screen, what is an easy method

Please specify what version of Turing you are using
4.1.1a
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Thu Jan 12, 2012 10:19 am   Post subject: RE:clear check method

That would depend on how you wrote the rest of your code. It could be very easy, or it could be very hard. Have you tried to solve it yourself yet?
Stop asking for easy solutions. There are no easy solutions. There are only solutions. The 'easiest' solution can easily be added to your code no matter how you wrote it. And it's math. Not even complicated math. Just addition and a comparison. Seriously, you need like, an integer and 2 lines of code.
Velocity




PostPosted: Thu Jan 12, 2012 12:04 pm   Post subject: RE:clear check method

can you tell me what to basically start with? like a simple introduction? what command?
chipanpriest




PostPosted: Thu Jan 12, 2012 1:34 pm   Post subject: Re: clear check method

Maybe make an array of boolean? For eample:

Turing:

var bricks : array 1 .. howevermanybricksyouhave of boolean

for i : 1 .. howevermanybricksyouhave
if bricks = true then
%...
end if
end for
Insectoid




PostPosted: Thu Jan 12, 2012 2:57 pm   Post subject: RE:clear check method

You don't even need an array of boolean (but if you're smart, you'll have one anyway). How many bricks are on the screen at the beginning? How many are there at the end? When does the number of bricks on the screen decrease?
Velocity




PostPosted: Thu Jan 12, 2012 5:48 pm   Post subject: RE:clear check method

oh so like i make an if statement if ball = brick... then brick -= 1? if brick = 0 then
you win... thanks alot guys, i get it now
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  [ 6 Posts ]
Jump to:   


Style:  
Search: