how can I write an ANSI C console screen buffer?

前端 未结 4 1474
我在风中等你
我在风中等你 2021-01-18 09:35

I\'m working on making an ASCII based game, and everywhere I look people are saying to use Console.Write() from MSDN, which is dandy and all if you\'re using Windows, but I\

4条回答
  •  滥情空心
    2021-01-18 10:05

    I think what you are looking for is the ANSI control character ESC[2J which clears the screen. You would call that after any change of state to "refresh" the console screen.

    See this page to learn about the rest of them. Using these codes you can define colors and formatting (spacing, alignment, indenting etc) on the console.

提交回复
热议问题