//  ~cs35/win_0.cpp		to show elemetary graphics

#include "CS35win.h"

int main ()
{
	int counter, height, width;
	char ch;
	
	cout << "What's your favorite keystroke? ";
	cin.get(ch); //same as cin>>ch; 
	cout << "Width? ";
	cin  >> width;
	cout << "Height? ";
	cin >> height;
	
	beginwin();   //create a window, after here u cant do cout or cin stuff
	
	
	for (counter = 0; counter < height; counter ++)
	{
		move (counter,0);
		addch(ch);
		refresh();
		hesitate(.3); //functiom wll print something then hesitate then print the 
		              // next thing
	}
	
	counter = 1;
	while (counter < width)
	{
		move (height,counter);
		addch(ch);
		refresh();
		hesitate(.1);
		counter ++;
	}

	for (counter = height; counter >= 0; counter -- );

	{
		move (counter,width);
		addch(ch);
		refresh();
		hesitate(.1);
	}
	refresh();  //  reprints the window, must have it to see effect in ./a.out
	hesitate(2);
	endwin();   // ends window
	return 0;
}

