Author |
Message |
Velocity
|
Posted: 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
|
|
|
Insectoid
|
Posted: 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
|
Posted: 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
|
Posted: 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
|
Posted: 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
|
Posted: 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 |
|
|
|
|
|
|