#include #include using namespace std; #include string dd[100]; char screen[75][75]; int pos; int sx,sy; bool exitf = false; void parse(string s) { unsigned int p=0,n; pos = 0; while(1) { n = s.find(" ",p); dd[pos] = s.substr(p,n-p); //cout << dd[pos]; //cout << dd[x] << endl; pos++; p = n+1; if (n == string::npos) return; } } void clear(int x1,int y1,int x2,int y2) { int a,b,c,d; if (x1y2) { if (y1>y2) { int u; u = y2; y2= y1; y1 = u; } } for (t = y1;t <= y2;t++) { putchar(x,t,'|'); } } void hline(int y,int x1,int x2) { if (x1>x2) { if (x1>x2) { int u; u = x2; x2= x1; x1 = u; } } int t; for (t = x1;t <= x2;t++) { putchar(t,y,'-'); } } void sline(int x1,int y1,int x2,int y2) { int s; for (s=0;s<=x2-x1;s++) { putchar(x1+s,y1+s,'\\'); } } void sline2(int x1,int y1,int x2,int y2) { int s; for (s=0;s<=x2-x1;s++) { putchar(x1+s,y1-s,'/'); } } void line(int x1,int y1, int x2, int y2) { if (x1 == x2) { vline(x1,y1,y2); return; } if (y1 == y2) { hline(y1,x1,x2); return; } if (y1