Repository navigation
Expand file tree
/
Copy pathProgram.cs
More file actions
59 lines (50 loc) · 1.71 KB
/
Copy pathProgram.cs
File metadata and controls
59 lines (50 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;
using System.IO;
namespace BoxManager
{
internal class Program
{
public static int storageHeight = 10;
public static int storageWidth = 10;
private static int boxNum = 10;
public static List<BoxInfo> boxes = new List<BoxInfo>();
public static List<BoxInfo> boxes2 = new List<BoxInfo>();
static void Main(string[] args)
{
GetValues();
Logic.GenerateBoxes(boxNum-1);
//StreamReader sr = File.OpenText("boxPrefab.txt");
//while (!sr.EndOfStream)
//{
// boxes.Add(new BoxInfo(sr.ReadLine()));
//}
foreach (BoxInfo box in boxes)
{
boxes2.Add(box);
}
Logic.ArrangeBoxes();
Renderer.Render();
}
private static void GetValues()
{
try
{
Console.Write("Enter storage height: ");
storageHeight = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter storage width: ");
storageWidth = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter the number of boxes: ");
boxNum = Convert.ToInt32(Console.ReadLine());
}
catch (Exception)
{
Console.BackgroundColor = ConsoleColor.Red;
Console.WriteLine("Input error: The simulation will use some default values!!!");
Console.WriteLine("-----------------------press ENTER-------------------------");
Console.ResetColor();
Console.ReadLine();
}
Console.Clear();
}
}
}