Spielsucht420.exe/SU420/TUI.cs

49 lines
814 B
C#

using System;
namespace _TUI
{
public class TUI
{
public TUI()
{
}
public string Generate()
{
string returnstring = "";
int w = Console.WindowWidth;
int h = Console.WindowHeight;
string[,] Terminal = new string[w,h];
//Console.WriteLine(w);
//Console.WriteLine(h);
//Console.WriteLine(Terminal.GetLength(0));
//Console.WriteLine(Terminal.GetLength(1));
for (int i=0; i<w; i++) {
for (int j=0; j<h-1; j++) {
if(i == 0 || j == 0 || i == w-2 || j == h-1 )
{
Terminal[i,j] = "#";
}else if(i == w-1){
Terminal[i,j] = "\n\r";
}else{
Terminal[i,j] = " ";
}
}
}
for (int i=0; i<w-1; i++) {
for (int j=0; j<h-1; j++) {
returnstring += Terminal[i,j];
}
}
return returnstring;
}
}
}