mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 15:16:33 -08:00
Simplify 3-D Plot (C#) folder structure
This commit is contained in:
38
87_3-D_Plot/csharp/Program.cs
Normal file
38
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