-
Notifications
You must be signed in to change notification settings - Fork 0
/
Pizza.cs
46 lines (35 loc) · 959 Bytes
/
Pizza.cs
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
using System.Collections.Generic;
namespace GoogleHashCode19
{
public class Pizza
{
public char[,] PizzaMap;
public int Rows, Columns;
public List<Slice> HorizontalSlices, VerticalSlices;
public int HorizontalScore, VerticalScore;
public enum Ingredients
{
TOMATOS = 'T',
MUSHROOMS = 'M'
}
public Pizza(int rows, int columns)
{
PizzaMap = new char[rows, columns];
Rows = rows;
Columns = columns;
HorizontalSlices = new List<Slice>();
VerticalSlices = new List<Slice>();
}
public void AddSlice(Slice slice)
{
if (slice.SliceType == Slice.Types.SLICE_HORIZONTAL)
{
HorizontalSlices.Add(slice);
}
else
{
VerticalSlices.Add(slice);
}
}
}
}