Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
How would you draw a brick wall pattern for turing?
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)

 Turing:

Please specify what version of Turing you are using

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
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 6 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: