Skip to content

Commit 0661e29

Browse files
committed
Added Interfaces for ICell and ICellOverseer as wella s an ActionEnum and implementations of the Interfaces
1 parent 60f8726 commit 0661e29

8 files changed

Lines changed: 130 additions & 2 deletions

File tree

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
obj/**
2-
bin/**
1+
/obj/*
2+
/bin/*
3+
.vs/*

CellSimulator.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
<ItemGroup>
4545
<Compile Include="Cell.cs" />
4646
<Compile Include="CellOverseer.cs" />
47+
<Compile Include="Enums\ActionEnum.cs" />
48+
<Compile Include="Interfaces\ICell.cs" />
49+
<Compile Include="Interfaces\ICellOverseer.cs" />
50+
<Compile Include="Models\Cell.cs" />
51+
<Compile Include="Models\CellOverseer.cs" />
4752
<Compile Include="Program.cs" />
4853
<Compile Include="Properties\AssemblyInfo.cs" />
4954
</ItemGroup>

CellSimulator.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.438
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CellSimulator", "CellSimulator.csproj", "{614DFFFA-D549-426F-882F-AB68DFB66BC4}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{614DFFFA-D549-426F-882F-AB68DFB66BC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{614DFFFA-D549-426F-882F-AB68DFB66BC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{614DFFFA-D549-426F-882F-AB68DFB66BC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{614DFFFA-D549-426F-882F-AB68DFB66BC4}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {1A341A9C-6CB6-451D-B080-4BC96D649C4A}
24+
EndGlobalSection
25+
EndGlobal

Enums/ActionEnum.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+

2+
namespace CellSimulator.Enums
3+
{
4+
public enum ActionEnum
5+
{
6+
7+
}
8+
}

Interfaces/ICell.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using CellSimulator.Enums;
2+
3+
namespace CellSimulator.Interfaces
4+
{
5+
public interface ICell
6+
{
7+
int ID { get; set; }
8+
int Age { get; set; }
9+
int Food { get; set; }
10+
int MaxFood { get; set; }
11+
int Energy { get; set; }
12+
int MaxEnergy { get; set; }
13+
ActionEnum LastAction { get; set; }
14+
15+
bool TrySplit();
16+
bool Split();
17+
}
18+
}

Interfaces/ICellOverseer.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace CellSimulator.Interfaces
8+
{
9+
public interface ICellOverseer
10+
{
11+
List<ICell> CellList { get; set; }
12+
13+
void AddCell();
14+
void SimulateNext();
15+
}
16+
}

Models/Cell.cs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using CellSimulator.Enums;
7+
using CellSimulator.Interfaces;
8+
9+
namespace CellSimulator.Models
10+
{
11+
public class Cell : ICell
12+
{
13+
public int ID { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
14+
public int Age { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
15+
public int Food { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
16+
public int MaxFood { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
17+
public int Energy { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
18+
public int MaxEnergy { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
19+
public ActionEnum LastAction { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
20+
21+
public bool Split()
22+
{
23+
throw new NotImplementedException();
24+
}
25+
26+
public bool TrySplit()
27+
{
28+
throw new NotImplementedException();
29+
}
30+
}
31+
}

Models/CellOverseer.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using CellSimulator.Interfaces;
7+
8+
namespace CellSimulator.Models
9+
{
10+
public class CellOverseer : ICellOverseer
11+
{
12+
public List<ICell> CellList { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
13+
14+
public void AddCell()
15+
{
16+
throw new NotImplementedException();
17+
}
18+
19+
public void SimulateNext()
20+
{
21+
throw new NotImplementedException();
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)