mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-13 13:37:38 -08:00
add 00_Alternate_Langage folder and move alternate ports there
This commit is contained in:
38
00_Alternate_Languages/87_3-D_Plot/csharp/Program.cs
Normal file
38
00_Alternate_Languages/87_3-D_Plot/csharp/Program.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
|
||||
namespace Plot
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
PrintTitle();
|
||||
|
||||
foreach (var row in Function.GetRows())
|
||||
{
|
||||
foreach (var z in row)
|
||||
{
|
||||
Plot(z);
|
||||
}
|
||||
Console.WriteLine();
|
||||
}
|
||||
}
|
||||
|
||||
private static void PrintTitle()
|
||||
{
|
||||
Console.WriteLine(" 3D Plot");
|
||||
Console.WriteLine(" Creative Computing Morristown, New Jersey");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine();
|
||||
Console.WriteLine();
|
||||
Console.WriteLine();
|
||||
}
|
||||
|
||||
private static void Plot(int z)
|
||||
{
|
||||
var x = Console.GetCursorPosition().Top;
|
||||
Console.SetCursorPosition(z, x);
|
||||
Console.Write("*");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user