Author 
Message 
Fabio

Posted: Thu Jun 10, 2010 11:26 am Post subject: How would you draw a brick wall pattern for turing? 


What is it you are trying to achieve?
I need a brick wall pattern that will fit the entire "Run" screen
What is the problem you are having?
I don't know how to achieve this.
Describe what you have tried to solve this problem
started off with horizontal lines but those were just magic numbers.
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>
Turing: 
<Add your code here>

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





Sponsor Sponsor



Tony

Posted: Thu Jun 10, 2010 1:05 pm Post subject: RE:How would you draw a brick wall pattern for turing? 


How would you go about drawing one on paper? (That is, describe the steps in detail) 
Tony's programming blog. DWITE  a programming contest. 




Cezna

Posted: Thu Jun 10, 2010 2:41 pm Post subject: RE:How would you draw a brick wall pattern for turing? 


You are going to need a for loop, possibly more than one, and the shape of the first brick, and then it should be very easy.
Just draw a row of bricks every other column (each column being the height of one of the bricks, not a text column).
Then have another for loop drawing the same thing, but every other column starting one up from the bottom, but slightly offset to the right of the first one. 





Unnamed.t

Posted: Thu Jun 10, 2010 3:30 pm Post subject: Re: How would you draw a brick wall pattern for turing? 


I'm sorry if I'm repeating cezna a bit, but this is just a typical way to say it.
Step 1. Draw the first picture of the brick.
Step 2. make a for loop for the x coordinate (e.g. for x: 1..200)
Step 3. nest a for loop in the for loop above for the y coordinate Turing:  for x: 1..200 for y: 1..50 end for end for 
Step 4. make sure the number parameters of your for loop are the same size as the length (x) and width (y) of your brick.
Step 5. add (or subtract) the for loop variable to the coordinates to have the tesselate the brick across the screen.
This is about as much guidance that I can give you, the thinking job is in your hands 





Cezna

Posted: Thu Jun 10, 2010 5:06 pm Post subject: RE:How would you draw a brick wall pattern for turing? 


Much clearer way of putting it. 





Unnamed.t

Posted: Thu Jun 10, 2010 5:08 pm Post subject: Re: How would you draw a brick wall pattern for turing? 


Thank you Cezna 





