SOURCE FILE: tilerSkeleton.cpp



/*

This program makes tile patterns -- diagrams like the one below.  The
diagrams represent a tiled surface.  The user tells how many tiles long and
wide s/he wants the pattern to be, and the program makes the diagram.

**************************************
|888888|##|888888|##|888888|##|888888|
|888888|##|888888|##|888888|##|888888|
|888888|##|888888|##|888888|##|888888|
|888888|##|888888|##|888888|##|888888|
**************************************
|888888|##|888888|##|888888|##|888888|
|888888|##|888888|##|888888|##|888888|
|888888|##|888888|##|888888|##|888888|
|888888|##|888888|##|888888|##|888888|
**************************************
|888888|##|888888|##|888888|##|888888|
|888888|##|888888|##|888888|##|888888|
|888888|##|888888|##|888888|##|888888|
|888888|##|888888|##|888888|##|888888|
**************************************

*/

#include <iostream>
using namespace std ;

/* GLOBAL CONSTANTS */
/* The maximum allowed dimensions of the tile pattern */
const int maxLength = 6 ;
const int maxWidth = 8 ;

/* PROTOYPE */
void printInformation(void) ;
  /* Tell the user about the program. */

/* PROTOYPE */
void getDimensions (int & length_x, int & width_x) ;
  /* Prompt the user and input each of the two dimensions.
     Put the values into the reference parameters
     length_x and width_x. */

/* PROTOYPE */
bool dimensionsOK (int length_t, int width_t) ;
  /* Determine whether the dimensions are allowed.
     If so, return true, else return false. */

/* PROTOYPE */
void printErrorMsg (int length_e, int width_e) ;
  /* Inform user:
     @ tell the user what the inputs were,
     @ say the input was incorrect,
     @ tell what is the correct range of inputs, and
     @ instruct the user to try running the program again.
  */

/* PROTOYPE */
void makePattern (int p_length, int p_width)  ;
    /* Make a diagram representing a tiled surface "p_length" tiles down the
       screen and "p_width" tiles across the screen.  */

/* ************************* */
/*      MAIN FUNCTION        */
/* ************************* */
int main()
{
   int length, width ;
   
   printInformation() ;
   getDimensions (length, width) ;
   if   ( dimensionsOK(length,width) )
        makePattern (length, width) ;
   else printErrorMsg(length, width) ;
   return 0;
}

/* ************************* */
/*    PRINT INFORMATION      */
/* ************************* */
void printInformation(void) 
{
   cout << endl ;

       /* Put code here that writes the information. */

   cout << endl ;
}

/* ************************* */
/*       GET DIMENSIONS      */
/* ************************* */
void getDimensions (int & length_z, int & width_z) 
{
       /* Put code here that gets the dimensions. */

}

/* ************************* */
/*       DIMENSIONS  OK      */
/* ************************* */
bool dimensionsOK (int length_t, int width_t) 
{
       /* Put code here that returns true if
          the dimensions are OK, else returns
          false.     */

}

/* ************************* */
/*     PRINT ERROR MSG       */
/* ************************* */
void printErrorMsg (int length_e, int width_e) 
{
       /* Put code here that writes the error 
          message (including the values of 
          length_e and width_e).   */

}

/* PROTOYPE */
void makeHorizBorder (int b_width) ;
     /* Function makeHorizBorder makes parts like this:

****************************

        that fit into patterns like this:

****************************
|888888|##|888888|##|888888|
|888888|##|888888|##|888888|
|888888|##|888888|##|888888|
|888888|##|888888|##|888888|
****************************

        The formal parameter b_width is the number of tiles 
        across that the pattern extends. */

/* PROTOYPE */
void makeTileRow (int b_width) ;
     /* Function makeTileRow makes parts like this:

|888888|##|888888|##|888888|
|888888|##|888888|##|888888|
|888888|##|888888|##|888888|
|888888|##|888888|##|888888|

        that fit into patterns like this:
****************************
|888888|##|888888|##|888888|
|888888|##|888888|##|888888|
|888888|##|888888|##|888888|
|888888|##|888888|##|888888|
****************************

        The formal parameter b_width is the number of tiles 
        across that the pattern extends. */

/* ************************* */
/*        MAKE PATTERN       */
/* ************************* */
void makePattern (int p_length, int p_width)  
{
  int rowNum ;
  cout << endl ;

  /*  Put Code Here That First Calls makeHorizBorder To Make The 
      First Horizontal Border.  Use p_width As The Argument. 
      Next Put Code Here That Runs A Loop That Iterates (Repeats) 
      p_length Times, And Calls makeTileRow And makeHorizBorder 
      In Each Iteration (Also Using p_width As The Argument). */

  cout << endl ;
  return ;
}

/* ************************* */
/*     MAKE HORIZ BORDER     */
/* ************************* */
void makeHorizBorder (int b_width) 
{

     /*  Here Put Code That First Makes A Group Of Eight Asterisks
         Like This:

********

         And Then Runs A Loop That Makes b_width-1
         Runs Of Ten Asterisks In Each Run.

         Include Code At The Very End That Writes A Newline. */

}

/* PROTOYPE */
void  makeCourseInteriorStrand (int b_width) ;
     /* Function makeCourseInteriorStrand 
        makes parts like this:

|888888|##|888888|##|888888|

     that fit into patterns like this:
****************************
|888888|##|888888|##|888888|
|888888|##|888888|##|888888|
|888888|##|888888|##|888888|
|888888|##|888888|##|888888|
****************************

     The formal parameter b_width is the number of tiles 
     across that the pattern extends. */

/* *************************** */
/*        MAKE TILE ROW        */
/* *************************** */
void makeTileRow (int b_width) 
{
   /*
        Put Code In Here That Just Calls makeCourseInteriorStrand
        Four Times.  Use b_width As The Argument.  
   */

}

/* *************************** */
/* MAKE COURSE INTERIOR STRAND */
/* *************************** */
void  makeCourseInteriorStrand (int b_width) 
{
     /*  Here Put Code That First Makes This Pattern:

|888888|

         And Then Runs A Loop That Makes b_width-1
         Runs Of This Pattern: 

##|888888|

        Include Code At The Very End That Writes A Newline.  */

}