![]() |
How do I clear the screen?
How do I clear the screen when I restart the "game" with a loop?
:
import cs1.Keyboard; |
Could try the escape code for clearing the screen
:
System.out.print ("\033c");http://vt100.net/docs/vt102-ug/chapter5.html Your mileage may vary. |
Where would i put that?
|
Quote:
if the code doesn't work, you can also print 30 newlines, that will also clear the screen. |
The code I gave you is an standard terminal escape code. It should work beautifully on everything *but* Windows. Microsoft's cmd is a terminal wannabe.
|
I need it to clear the screen if
:
again == y |
Then stick it in a while loop:
:
while (again == 'y') |
That did not work
|
Show us what you tried...
|
Did you set again first?
|
| All times are GMT -5. The time now is 2:28 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC