Skip to content

Commit 1cbd9f5

Browse files
committed
initial
0 parents  commit 1cbd9f5

25 files changed

+2949
-0
lines changed

.gitignore

+198
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.userosscache
8+
*.sln.docstates
9+
10+
# User-specific files (MonoDevelop/Xamarin Studio)
11+
*.userprefs
12+
13+
# Build results
14+
[Dd]ebug/
15+
[Dd]ebugPublic/
16+
[Rr]elease/
17+
[Rr]eleases/
18+
x64/
19+
x86/
20+
build/
21+
bld/
22+
[Bb]in/
23+
[Oo]bj/
24+
25+
# Visual Studo 2015 cache/options directory
26+
.vs/
27+
28+
# MSTest test Results
29+
[Tt]est[Rr]esult*/
30+
[Bb]uild[Ll]og.*
31+
32+
# NUNIT
33+
*.VisualState.xml
34+
TestResult.xml
35+
36+
# Build Results of an ATL Project
37+
[Dd]ebugPS/
38+
[Rr]eleasePS/
39+
dlldata.c
40+
41+
*_i.c
42+
*_p.c
43+
*_i.h
44+
*.ilk
45+
*.meta
46+
*.obj
47+
*.pch
48+
*.pdb
49+
*.pgc
50+
*.pgd
51+
*.rsp
52+
*.sbr
53+
*.tlb
54+
*.tli
55+
*.tlh
56+
*.tmp
57+
*.tmp_proj
58+
*.log
59+
*.vspscc
60+
*.vssscc
61+
.builds
62+
*.pidb
63+
*.svclog
64+
*.scc
65+
66+
# Chutzpah Test files
67+
_Chutzpah*
68+
69+
# Visual C++ cache files
70+
ipch/
71+
*.aps
72+
*.ncb
73+
*.opensdf
74+
*.sdf
75+
*.cachefile
76+
77+
# Visual Studio profiler
78+
*.psess
79+
*.vsp
80+
*.vspx
81+
82+
# TFS 2012 Local Workspace
83+
$tf/
84+
85+
# Guidance Automation Toolkit
86+
*.gpState
87+
88+
# ReSharper is a .NET coding add-in
89+
_ReSharper*/
90+
*.[Rr]e[Ss]harper
91+
*.DotSettings.user
92+
93+
# JustCode is a .NET coding addin-in
94+
.JustCode
95+
96+
# TeamCity is a build add-in
97+
_TeamCity*
98+
99+
# DotCover is a Code Coverage Tool
100+
*.dotCover
101+
102+
# NCrunch
103+
_NCrunch_*
104+
.*crunch*.local.xml
105+
106+
# MightyMoose
107+
*.mm.*
108+
AutoTest.Net/
109+
110+
# Web workbench (sass)
111+
.sass-cache/
112+
113+
# Installshield output folder
114+
[Ee]xpress/
115+
116+
# DocProject is a documentation generator add-in
117+
DocProject/buildhelp/
118+
DocProject/Help/*.HxT
119+
DocProject/Help/*.HxC
120+
DocProject/Help/*.hhc
121+
DocProject/Help/*.hhk
122+
DocProject/Help/*.hhp
123+
DocProject/Help/Html2
124+
DocProject/Help/html
125+
126+
# Click-Once directory
127+
publish/
128+
129+
# Publish Web Output
130+
*.[Pp]ublish.xml
131+
*.azurePubxml
132+
# TODO: Comment the next line if you want to checkin your web deploy settings
133+
# but database connection strings (with potential passwords) will be unencrypted
134+
*.pubxml
135+
*.publishproj
136+
137+
# NuGet Packages
138+
*.nupkg
139+
# The packages folder can be ignored because of Package Restore
140+
**/packages/*
141+
# except build/, which is used as an MSBuild target.
142+
!**/packages/build/
143+
# Uncomment if necessary however generally it will be regenerated when needed
144+
#!**/packages/repositories.config
145+
146+
# Windows Azure Build Output
147+
csx/
148+
*.build.csdef
149+
150+
# Windows Store app package directory
151+
AppPackages/
152+
153+
# Others
154+
*.[Cc]ache
155+
ClientBin/
156+
[Ss]tyle[Cc]op.*
157+
~$*
158+
*~
159+
*.dbmdl
160+
*.dbproj.schemaview
161+
*.pfx
162+
*.publishsettings
163+
node_modules/
164+
bower_components/
165+
166+
# RIA/Silverlight projects
167+
Generated_Code/
168+
169+
# Backup & report files from converting an old project file
170+
# to a newer Visual Studio version. Backup files are not needed,
171+
# because we have git ;-)
172+
_UpgradeReport_Files/
173+
Backup*/
174+
UpgradeLog*.XML
175+
UpgradeLog*.htm
176+
177+
# SQL Server files
178+
*.mdf
179+
*.ldf
180+
181+
# Business Intelligence projects
182+
*.rdl.data
183+
*.bim.layout
184+
*.bim_*.settings
185+
186+
# Microsoft Fakes
187+
FakesAssemblies/
188+
189+
# Node.js Tools for Visual Studio
190+
.ntvs_analysis.dat
191+
192+
# Visual Studio 6 build log
193+
*.plg
194+
195+
# Visual Studio 6 workspace options file
196+
*.opt
197+
198+
*Solved.cs

ConwaysGameOfLife/App.config

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
5+
</startup>
6+
<runtime>
7+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
8+
<dependentAssembly>
9+
<assemblyIdentity name="StatePrinter" publicKeyToken="693eec472ad792e3" culture="neutral" />
10+
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
11+
</dependentAssembly>
12+
</assemblyBinding>
13+
</runtime>
14+
</configuration>

ConwaysGameOfLife/ConsoleUi.cs

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
3+
namespace ConwaysGameOfLife
4+
{
5+
public class ConsoleUi : IGameUi
6+
{
7+
public void UpdateAll(IReadonlyField field)
8+
{
9+
Console.SetCursorPosition(0, 0);
10+
for (int y = 0; y < field.Height; y++)
11+
{
12+
for (int x = 0; x < field.Width; x++)
13+
{
14+
var symbol = field.IsAlive(x, y) ? '#' : ' ';
15+
Console.Write(symbol);
16+
}
17+
Console.WriteLine();
18+
}
19+
}
20+
21+
public void UpdateCell(int x, int y, bool alive)
22+
{
23+
Console.SetCursorPosition(x, y);
24+
Console.Write(alive ? '#' : ' ');
25+
26+
}
27+
}
28+
}
+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{ACBC03B3-A778-4F66-9D6D-43C77D64CC23}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>ConwaysGameOfLife</RootNamespace>
11+
<AssemblyName>ConwaysGameOfLife</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<NuGetPackageImportStamp>c1430e3a</NuGetPackageImportStamp>
15+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<PlatformTarget>AnyCPU</PlatformTarget>
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<PlatformTarget>AnyCPU</PlatformTarget>
29+
<DebugType>pdbonly</DebugType>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
</PropertyGroup>
36+
<ItemGroup>
37+
<Reference Include="ApprovalTests, Version=3.0.0.0, Culture=neutral, PublicKeyToken=11bd7d124fc62e0f, processorArchitecture=MSIL">
38+
<HintPath>..\packages\ApprovalTests.3.0.11\lib\net40\ApprovalTests.dll</HintPath>
39+
<Private>True</Private>
40+
</Reference>
41+
<Reference Include="ApprovalUtilities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=11bd7d124fc62e0f, processorArchitecture=MSIL">
42+
<HintPath>..\packages\ApprovalUtilities.3.0.11\lib\net45\ApprovalUtilities.dll</HintPath>
43+
<Private>True</Private>
44+
</Reference>
45+
<Reference Include="ApprovalUtilities.Net45, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
46+
<HintPath>..\packages\ApprovalUtilities.3.0.11\lib\net45\ApprovalUtilities.Net45.dll</HintPath>
47+
<Private>True</Private>
48+
</Reference>
49+
<Reference Include="FakeItEasy, Version=1.25.3.0, Culture=neutral, PublicKeyToken=eff28e2146d5fd2c, processorArchitecture=MSIL">
50+
<HintPath>..\packages\FakeItEasy.1.25.3\lib\net40\FakeItEasy.dll</HintPath>
51+
<Private>True</Private>
52+
</Reference>
53+
<Reference Include="Ninject, Version=3.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
54+
<HintPath>..\Conditionals\packages\Ninject.3.2.2.0\lib\net45-full\Ninject.dll</HintPath>
55+
<Private>True</Private>
56+
</Reference>
57+
<Reference Include="Ninject.Extensions.Conventions, Version=3.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
58+
<HintPath>..\Conditionals\packages\Ninject.Extensions.Conventions.3.2.0.0\lib\net45-full\Ninject.Extensions.Conventions.dll</HintPath>
59+
<Private>True</Private>
60+
</Reference>
61+
<Reference Include="nunit.framework, Version=3.2.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
62+
<HintPath>..\Conditionals\packages\NUnit.3.2.1\lib\net45\nunit.framework.dll</HintPath>
63+
<Private>True</Private>
64+
</Reference>
65+
<Reference Include="Ploeh.AutoFixture, Version=3.45.1.0, Culture=neutral, PublicKeyToken=b24654c590009d4f, processorArchitecture=MSIL">
66+
<HintPath>..\Conditionals\packages\AutoFixture.3.45.1\lib\net40\Ploeh.AutoFixture.dll</HintPath>
67+
<Private>True</Private>
68+
</Reference>
69+
<Reference Include="Shouldly, Version=2.7.0.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
70+
<HintPath>..\packages\Shouldly.2.7.0\lib\net40\Shouldly.dll</HintPath>
71+
<Private>True</Private>
72+
</Reference>
73+
<Reference Include="StatePrinter, Version=2.1.0.0, Culture=neutral, PublicKeyToken=693eec472ad792e3, processorArchitecture=MSIL">
74+
<HintPath>..\Conditionals\packages\StatePrinter.3.0.0\lib\net35\StatePrinter.dll</HintPath>
75+
<Private>True</Private>
76+
</Reference>
77+
<Reference Include="System" />
78+
<Reference Include="System.Core" />
79+
<Reference Include="System.Xml.Linq" />
80+
<Reference Include="System.Data.DataSetExtensions" />
81+
<Reference Include="Microsoft.CSharp" />
82+
<Reference Include="System.Data" />
83+
<Reference Include="System.Xml" />
84+
</ItemGroup>
85+
<ItemGroup>
86+
<Compile Include="ConsoleUi.cs" />
87+
<Compile Include="Game.cs" />
88+
<Compile Include="Game_Ui_Interaction_Tests.cs" />
89+
<Compile Include="IGameUi.cs" />
90+
<Compile Include="IReadonlyField.cs" />
91+
<Compile Include="Patterns.cs" />
92+
<Compile Include="Point.cs" />
93+
<Compile Include="Program.cs" />
94+
<Compile Include="Properties\AssemblyInfo.cs" />
95+
<Compile Include="Size.cs" />
96+
</ItemGroup>
97+
<ItemGroup>
98+
<None Include="App.config" />
99+
<None Include="packages.config" />
100+
</ItemGroup>
101+
<ItemGroup>
102+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
103+
</ItemGroup>
104+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
105+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
106+
Other similar extension points exist, see Microsoft.Common.targets.
107+
<Target Name="BeforeBuild">
108+
</Target>
109+
<Target Name="AfterBuild">
110+
</Target>
111+
-->
112+
</Project>

0 commit comments

Comments
 (0)