Skip to content

Commit

Permalink
Path saving fix - silly off by 1 errors...
Browse files Browse the repository at this point in the history
  • Loading branch information
GABowers committed Oct 24, 2019
1 parent 47dad7f commit 1e8ce52
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 39 deletions.
2 changes: 1 addition & 1 deletion Capstone Application/CA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public CA(ControllerScript control, int width, int height, int numStates, List<N

void TemplateCheck()
{
Console.WriteLine("TEMPLAtae: " + template);
//Console.WriteLine("TEMPLAtae: " + template);
switch(template)
{
case Template.DLA:
Expand Down
4 changes: 2 additions & 2 deletions Capstone Application/Capstone Application.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>C:\Users\GAB\Desktop\CAPSTONE\Winform\2019-07-13\</PublishUrl>
<PublishUrl>C:\Users\GAB\Desktop\CAPSTONE\Winform\2019-10-13\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
Expand All @@ -22,7 +22,7 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>22</ApplicationRevision>
<ApplicationRevision>23</ApplicationRevision>
<ApplicationVersion>0.1.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down
38 changes: 19 additions & 19 deletions Capstone Application/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Capstone Application/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -346,17 +346,18 @@ public void AutoPathSave(string time, string folder_path, bool addToName)
wt.WriteLine();
wt.Write("Iteration,");
List<int> lengths = paths.Select(x => x.Count).ToList();
int max = lengths.Max();
for (int i = 0; i < paths.Count; i++)
{
wt.Write(agent + (i + 1).ToString() + "," + ",");
}
wt.WriteLine();
for (int i = 0; i < lengths.Max(); i++)
for (int i = 0; i < max; i++)
{
wt.Write(i + ",");
for (int j = 0; j < paths.Count; j++)
{
if(controllerScript.Paths[j].Count >= i)
if(paths[j].Count > i)
{
wt.Write(paths[j][i].Item1 + "," + paths[j][i].Item2 + ",");
}
Expand Down
30 changes: 15 additions & 15 deletions Capstone Application/Form1.resx
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,7 @@
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="iterationLabel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA+SURBVHhe7cExAQAAAMKg9U9tCy8gAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgqAacpAAB5eVcggAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="resetRunsButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
Expand All @@ -191,13 +184,14 @@
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>237, 17</value>
</metadata>
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>401, 17</value>
</metadata>
<data name="resetRunsButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="iterationLabel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA+SURBVHhe7cExAQAAAMKg9U9tCy8gAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgqAacpAAB5eVcggAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
Expand All @@ -212,4 +206,10 @@
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>237, 17</value>
</metadata>
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>401, 17</value>
</metadata>
</root>

0 comments on commit 1e8ce52

Please sign in to comment.