title: How Would I go about making a box around the screen using Ncurses
body: <p>I am making a simple program for a box to move in an open area. now that's done I would like to make a box around the screen (Not like an Ncurses window but just to make a display). I just have don't know how to do it. I searched google and also SO for the fix to this problem but I can't find it. does anybody know how to make a box like that around the screen.</p>
  
  <p><img src="https://i.stack.imgur.com/5746v.png" alt="Here U go"></p>
  
  <p>The collision is already there, I just need to make a box around it. I was thinking about using characters like a normal box in Ncurses but that might not be possible, Is it possible to make a box in a box?</p>
  
  <p>Here I have an example of a box I made using Ncurses (My formatting sucks though, the points aren't there in the real box)</p>
  
  <pre><code>+--------+
  |........|
  +--------+
  </code></pre>
  
  <p>This code is the code for the movement and also calculates the collision with the outside of the field (So where the box should be):</p>
  
  <pre><code>while((ch = getch()) != KEY_F(1))
  {   switch(ch)
      {   case KEY_LEFT:
          if(win.startx&gt;1){
              create_box(&amp;win, FALSE);
              --win.startx;
              create_box(&amp;win, TRUE);
          }
              break;
          case KEY_RIGHT:
          if(win.startx&lt;122){
              create_box(&amp;win, FALSE);
              ++win.startx;
              create_box(&amp;win, TRUE);
          }
              break;
          case KEY_UP:
          if(win.starty&gt;1){
              create_box(&amp;win, FALSE);
              --win.starty;
              create_box(&amp;win, TRUE);
          }
              break;
          case KEY_DOWN:
          if(win.starty&lt;44){
              create_box(&amp;win, FALSE);
              ++win.starty;
              create_box(&amp;win, TRUE);
          }
              break;  
      }
  }
  endwin();
  return 0;
  </code></pre>
  
  <p>As you can see the big box is on the first x and y line (So the first column in the terminal and the first line in the terminal) and also on line number 44 and column number 122 (the one most at the bottom and most right line and column in the terminal). The collision already exists, If you want the full code you can click this <a href="http://pastebin.com/tj5G6Jm7" rel="nofollow noreferrer">link to pastebin</a> and you can see how it works. (remember to compile with -lncurses behind the compiling command)</p>