瀏覽代碼

Merge ebc92a376a9627cfe49de51ea2d4e3b86c6e4bf7 into 2286bf332a6a66859fa1ab1a7063f5e3ecc912fc

Luis J. Romero 6 年之前
父節點
當前提交
e822ea10cc
沒有帳戶連結到提交者的電子郵件

+ 260
- 208
.idea/workspace.xml 查看文件

@@ -1,7 +1,9 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4
-    <list default="true" id="e282cee1-bfe9-42a3-9794-9633eb4654d1" name="Default" comment="" />
4
+    <list default="true" id="e282cee1-bfe9-42a3-9794-9633eb4654d1" name="Default" comment="">
5
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java" afterPath="$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java" />
6
+    </list>
5 7
     <ignored path="$PROJECT_DIR$/target/" />
6 8
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
7 9
     <option name="TRACKING_ENABLED" value="true" />
@@ -11,82 +13,56 @@
11 13
     <option name="LAST_RESOLUTION" value="IGNORE" />
12 14
   </component>
13 15
   <component name="FileEditorManager">
14
-    <leaf>
15
-      <file leaf-file-name="SimpleWindow.java" pinned="false" current-in-tab="false">
16
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java">
17
-          <provider selected="true" editor-type-id="text-editor">
18
-            <state relative-caret-position="289">
19
-              <caret line="17" column="42" lean-forward="false" selection-start-line="17" selection-start-column="42" selection-end-line="17" selection-end-column="42" />
20
-              <folding>
21
-                <element signature="imports" expanded="true" />
22
-              </folding>
23
-            </state>
24
-          </provider>
25
-        </entry>
26
-      </file>
27
-      <file leaf-file-name="ConwayGameOfLife.java" pinned="false" current-in-tab="false">
28
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java">
29
-          <provider selected="true" editor-type-id="text-editor">
30
-            <state relative-caret-position="164">
31
-              <caret line="20" column="0" lean-forward="false" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
32
-              <folding>
33
-                <element signature="e#585#586#0" expanded="true" />
34
-                <element signature="e#676#677#0" expanded="true" />
35
-                <element signature="e#712#713#0" expanded="true" />
36
-                <element signature="e#1429#1430#0" expanded="true" />
37
-                <element signature="e#1453#1454#0" expanded="true" />
38
-              </folding>
39
-            </state>
40
-          </provider>
41
-        </entry>
42
-      </file>
43
-      <file leaf-file-name="JAVA/com.zipcodeconway.ConwayGameOfLife" pinned="false" current-in-tab="false">
44
-        <entry file="uml://JAVA/com.zipcodeconway.ConwayGameOfLife">
45
-          <provider selected="true" editor-type-id="UmlEditorProvider">
46
-            <state>
47
-              <ID>JAVA</ID>
48
-              <OriginalElement>com.zipcodeconway.ConwayGameOfLife</OriginalElement>
49
-              <nodes>
50
-                <node x="-54.0" y="-179.0">com.zipcodeconway.ConwayGameOfLife</node>
51
-              </nodes>
52
-              <notes />
53
-              <edges />
54
-              <settings layout="Hierarchic Group" zoom="1.0" x="-203.0" y="-1.0" />
55
-              <SelectedNodes />
56
-              <Categories>
57
-                <Category>Constructors</Category>
58
-                <Category>Methods</Category>
59
-              </Categories>
60
-              <SCOPE>All</SCOPE>
61
-              <VISIBILITY>private</VISIBILITY>
62
-            </state>
63
-          </provider>
64
-        </entry>
65
-      </file>
66
-      <file leaf-file-name="README.md" pinned="false" current-in-tab="false">
67
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/README.md">
68
-          <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
69
-            <state split_layout="SPLIT">
70
-              <first_editor relative-caret-position="236">
71
-                <caret line="52" column="194" lean-forward="false" selection-start-line="52" selection-start-column="194" selection-end-line="52" selection-end-column="194" />
72
-                <folding />
73
-              </first_editor>
74
-              <second_editor />
75
-            </state>
76
-          </provider>
77
-        </entry>
78
-      </file>
79
-      <file leaf-file-name="ConwayGameOfLifeTest.java" pinned="false" current-in-tab="true">
80
-        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
81
-          <provider selected="true" editor-type-id="text-editor">
82
-            <state relative-caret-position="510">
83
-              <caret line="32" column="32" lean-forward="false" selection-start-line="32" selection-start-column="32" selection-end-line="32" selection-end-column="32" />
84
-              <folding />
85
-            </state>
86
-          </provider>
87
-        </entry>
88
-      </file>
89
-    </leaf>
16
+    <splitter split-orientation="horizontal" split-proportion="0.34488449">
17
+      <split-first>
18
+        <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
19
+          <file leaf-file-name="ConwayGameOfLifeTest.java" pinned="false" current-in-tab="true">
20
+            <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
21
+              <provider selected="true" editor-type-id="text-editor">
22
+                <state relative-caret-position="378">
23
+                  <caret line="66" column="21" lean-forward="true" selection-start-line="66" selection-start-column="21" selection-end-line="66" selection-end-column="21" />
24
+                  <folding>
25
+                    <element signature="imports" expanded="true" />
26
+                  </folding>
27
+                </state>
28
+              </provider>
29
+            </entry>
30
+          </file>
31
+        </leaf>
32
+      </split-first>
33
+      <split-second>
34
+        <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
35
+          <file leaf-file-name="SimpleWindow.java" pinned="false" current-in-tab="false">
36
+            <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java">
37
+              <provider selected="true" editor-type-id="text-editor">
38
+                <state relative-caret-position="870">
39
+                  <caret line="58" column="47" lean-forward="false" selection-start-line="54" selection-start-column="31" selection-end-line="58" selection-end-column="47" />
40
+                  <folding>
41
+                    <element signature="imports" expanded="true" />
42
+                  </folding>
43
+                </state>
44
+              </provider>
45
+            </entry>
46
+          </file>
47
+          <file leaf-file-name="ConwayGameOfLife.java" pinned="false" current-in-tab="true">
48
+            <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java">
49
+              <provider selected="true" editor-type-id="text-editor">
50
+                <state relative-caret-position="15">
51
+                  <caret line="101" column="0" lean-forward="true" selection-start-line="101" selection-start-column="0" selection-end-line="101" selection-end-column="0" />
52
+                  <folding>
53
+                    <element signature="imports" expanded="true" />
54
+                    <element signature="e#2757#2758#0" expanded="true" />
55
+                    <element signature="e#2794#2795#0" expanded="true" />
56
+                    <element signature="e#2839#2840#0" expanded="true" />
57
+                    <element signature="e#2879#2880#0" expanded="true" />
58
+                  </folding>
59
+                </state>
60
+              </provider>
61
+            </entry>
62
+          </file>
63
+        </leaf>
64
+      </split-second>
65
+    </splitter>
90 66
   </component>
91 67
   <component name="FileTemplateManagerImpl">
92 68
     <option name="RECENT_TEMPLATES">
@@ -125,9 +101,9 @@
125 101
         <option value="$PROJECT_DIR$/src/main/java/SimpleWindow.java" />
126 102
         <option value="$PROJECT_DIR$/src/main/java/ConwayGameOfLife.java" />
127 103
         <option value="$PROJECT_DIR$/src/main/java/Life.java" />
128
-        <option value="$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java" />
129
-        <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java" />
130 104
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/README.md" />
105
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java" />
106
+        <option value="$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java" />
131 107
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java" />
132 108
       </list>
133 109
     </option>
@@ -139,10 +115,10 @@
139 115
     <sorting>DEFINITION_ORDER</sorting>
140 116
   </component>
141 117
   <component name="ProjectFrameBounds">
142
-    <option name="x" value="82" />
143
-    <option name="y" value="32" />
144
-    <option name="width" value="1440" />
145
-    <option name="height" value="821" />
118
+    <option name="x" value="216" />
119
+    <option name="y" value="-1013" />
120
+    <option name="width" value="1447" />
121
+    <option name="height" value="985" />
146 122
   </component>
147 123
   <component name="ProjectView">
148 124
     <navigator currentView="ProjectPane" proportions="" version="1">
@@ -159,55 +135,57 @@
159 135
       <foldersAlwaysOnTop value="true" />
160 136
     </navigator>
161 137
     <panes>
138
+      <pane id="Scratches" />
139
+      <pane id="AndroidView" />
162 140
       <pane id="ProjectPane">
163 141
         <subPane>
164 142
           <expand>
165 143
             <path>
166
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
167
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
144
+              <item name="ConwayGameOfLife" type="b2602c69:ProjectViewProjectNode" />
145
+              <item name="ConwayGameOfLife" type="462c0819:PsiDirectoryNode" />
168 146
             </path>
169 147
             <path>
170
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
171
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
148
+              <item name="ConwayGameOfLife" type="b2602c69:ProjectViewProjectNode" />
149
+              <item name="ConwayGameOfLife" type="462c0819:PsiDirectoryNode" />
172 150
               <item name="src" type="462c0819:PsiDirectoryNode" />
173 151
             </path>
174 152
             <path>
175
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
176
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
153
+              <item name="ConwayGameOfLife" type="b2602c69:ProjectViewProjectNode" />
154
+              <item name="ConwayGameOfLife" type="462c0819:PsiDirectoryNode" />
177 155
               <item name="src" type="462c0819:PsiDirectoryNode" />
178 156
               <item name="main" type="462c0819:PsiDirectoryNode" />
179 157
             </path>
180 158
             <path>
181
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
182
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
159
+              <item name="ConwayGameOfLife" type="b2602c69:ProjectViewProjectNode" />
160
+              <item name="ConwayGameOfLife" type="462c0819:PsiDirectoryNode" />
183 161
               <item name="src" type="462c0819:PsiDirectoryNode" />
184 162
               <item name="main" type="462c0819:PsiDirectoryNode" />
185 163
               <item name="java" type="462c0819:PsiDirectoryNode" />
186 164
             </path>
187 165
             <path>
188
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
189
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
166
+              <item name="ConwayGameOfLife" type="b2602c69:ProjectViewProjectNode" />
167
+              <item name="ConwayGameOfLife" type="462c0819:PsiDirectoryNode" />
190 168
               <item name="src" type="462c0819:PsiDirectoryNode" />
191 169
               <item name="main" type="462c0819:PsiDirectoryNode" />
192 170
               <item name="java" type="462c0819:PsiDirectoryNode" />
193 171
               <item name="zipcodeconway" type="462c0819:PsiDirectoryNode" />
194 172
             </path>
195 173
             <path>
196
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
197
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
174
+              <item name="ConwayGameOfLife" type="b2602c69:ProjectViewProjectNode" />
175
+              <item name="ConwayGameOfLife" type="462c0819:PsiDirectoryNode" />
198 176
               <item name="src" type="462c0819:PsiDirectoryNode" />
199 177
               <item name="test" type="462c0819:PsiDirectoryNode" />
200 178
             </path>
201 179
             <path>
202
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
203
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
180
+              <item name="ConwayGameOfLife" type="b2602c69:ProjectViewProjectNode" />
181
+              <item name="ConwayGameOfLife" type="462c0819:PsiDirectoryNode" />
204 182
               <item name="src" type="462c0819:PsiDirectoryNode" />
205 183
               <item name="test" type="462c0819:PsiDirectoryNode" />
206 184
               <item name="java" type="462c0819:PsiDirectoryNode" />
207 185
             </path>
208 186
             <path>
209
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
210
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
187
+              <item name="ConwayGameOfLife" type="b2602c69:ProjectViewProjectNode" />
188
+              <item name="ConwayGameOfLife" type="462c0819:PsiDirectoryNode" />
211 189
               <item name="src" type="462c0819:PsiDirectoryNode" />
212 190
               <item name="test" type="462c0819:PsiDirectoryNode" />
213 191
               <item name="java" type="462c0819:PsiDirectoryNode" />
@@ -217,17 +195,15 @@
217 195
           <select />
218 196
         </subPane>
219 197
       </pane>
220
-      <pane id="PackagesPane" />
221
-      <pane id="AndroidView" />
222
-      <pane id="Scratches" />
223 198
       <pane id="Scope" />
199
+      <pane id="PackagesPane" />
224 200
     </panes>
225 201
   </component>
226 202
   <component name="PropertiesComponent">
227 203
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
228 204
     <property name="WebServerToolWindowFactoryState" value="false" />
229 205
     <property name="aspect.path.notification.shown" value="true" />
230
-    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
206
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/pom.xml" />
231 207
     <property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
232 208
     <property name="project.structure.last.edited" value="Modules" />
233 209
     <property name="project.structure.proportion" value="0.15" />
@@ -260,7 +236,7 @@
260 236
       </list>
261 237
     </option>
262 238
   </component>
263
-  <component name="RunManager" selected="JUnit.ConwayGameOfLifeTest">
239
+  <component name="RunManager" selected="Application.ConwayGameOfLife">
264 240
     <configuration default="true" type="Applet" factoryName="Applet">
265 241
       <option name="HTML_USED" value="false" />
266 242
       <option name="WIDTH" value="400" />
@@ -287,9 +263,14 @@
287 263
       <module name="Game-Of-Life-Java" />
288 264
       <envs />
289 265
     </configuration>
290
-    <configuration name="GameofLife" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
291
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
292
-      <option name="MAIN_CLASS_NAME" value="GameofLife" />
266
+    <configuration name="SimpleWindow" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
267
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
268
+        <pattern>
269
+          <option name="PATTERN" value="com.zipcodeconway.*" />
270
+          <option name="ENABLED" value="true" />
271
+        </pattern>
272
+      </extension>
273
+      <option name="MAIN_CLASS_NAME" value="com.zipcodeconway.SimpleWindow" />
293 274
       <option name="VM_PARAMETERS" />
294 275
       <option name="PROGRAM_PARAMETERS" />
295 276
       <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
@@ -315,7 +296,7 @@
315 296
       <module name="" />
316 297
       <envs />
317 298
     </configuration>
318
-    <configuration name="ConwayGameOfLifeTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
299
+    <configuration name="ConwayGameOfLifeTest.copyAndZeroOutTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
319 300
       <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
320 301
         <pattern>
321 302
           <option name="PATTERN" value="com.zipcodeconway.*" />
@@ -327,8 +308,8 @@
327 308
       <option name="ALTERNATIVE_JRE_PATH" />
328 309
       <option name="PACKAGE_NAME" value="com.zipcodeconway" />
329 310
       <option name="MAIN_CLASS_NAME" value="com.zipcodeconway.ConwayGameOfLifeTest" />
330
-      <option name="METHOD_NAME" />
331
-      <option name="TEST_OBJECT" value="class" />
311
+      <option name="METHOD_NAME" value="copyAndZeroOutTest" />
312
+      <option name="TEST_OBJECT" value="method" />
332 313
       <option name="VM_PARAMETERS" value="-ea" />
333 314
       <option name="PARAMETERS" />
334 315
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
@@ -340,7 +321,7 @@
340 321
       <envs />
341 322
       <patterns />
342 323
     </configuration>
343
-    <configuration name="ConwayGameOfLifeTest.runTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
324
+    <configuration name="ConwayGameOfLifeTest.runTest1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
344 325
       <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
345 326
         <pattern>
346 327
           <option name="PATTERN" value="com.zipcodeconway.*" />
@@ -352,7 +333,7 @@
352 333
       <option name="ALTERNATIVE_JRE_PATH" />
353 334
       <option name="PACKAGE_NAME" value="com.zipcodeconway" />
354 335
       <option name="MAIN_CLASS_NAME" value="com.zipcodeconway.ConwayGameOfLifeTest" />
355
-      <option name="METHOD_NAME" value="runTest" />
336
+      <option name="METHOD_NAME" value="runTest1" />
356 337
       <option name="TEST_OBJECT" value="method" />
357 338
       <option name="VM_PARAMETERS" value="-ea" />
358 339
       <option name="PARAMETERS" />
@@ -473,19 +454,19 @@
473 454
     </configuration>
474 455
     <list size="6">
475 456
       <item index="0" class="java.lang.String" itemvalue="Maven.ConwayLife" />
476
-      <item index="1" class="java.lang.String" itemvalue="Application.GameofLife" />
477
-      <item index="2" class="java.lang.String" itemvalue="Application.ConwayGameOfLife" />
478
-      <item index="3" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest" />
479
-      <item index="4" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest2" />
480
-      <item index="5" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest" />
457
+      <item index="1" class="java.lang.String" itemvalue="Application.ConwayGameOfLife" />
458
+      <item index="2" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest2" />
459
+      <item index="3" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest1" />
460
+      <item index="4" class="java.lang.String" itemvalue="Application.SimpleWindow" />
461
+      <item index="5" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.copyAndZeroOutTest" />
481 462
     </list>
482 463
     <recent_temporary>
483 464
       <list size="5">
484
-        <item index="0" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest" />
485
-        <item index="1" class="java.lang.String" itemvalue="Application.ConwayGameOfLife" />
486
-        <item index="2" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest2" />
487
-        <item index="3" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest" />
488
-        <item index="4" class="java.lang.String" itemvalue="Application.GameofLife" />
465
+        <item index="0" class="java.lang.String" itemvalue="Application.ConwayGameOfLife" />
466
+        <item index="1" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.copyAndZeroOutTest" />
467
+        <item index="2" class="java.lang.String" itemvalue="Application.SimpleWindow" />
468
+        <item index="3" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest2" />
469
+        <item index="4" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest1" />
489 470
       </list>
490 471
     </recent_temporary>
491 472
   </component>
@@ -503,72 +484,78 @@
503 484
       <option name="presentableId" value="Default" />
504 485
       <updated>1519668901598</updated>
505 486
       <workItem from="1519668902904" duration="14517000" />
487
+      <workItem from="1520632065553" duration="7357000" />
488
+      <workItem from="1520694861381" duration="11571000" />
489
+      <workItem from="1520894472201" duration="3561000" />
506 490
     </task>
507 491
     <servers />
508 492
   </component>
509 493
   <component name="TestHistory">
510
-    <history-entry file="ConwayGameOfLifeTest - 2018.02.26 at 15h 45m 01s.xml">
494
+    <history-entry file="ConwayGameOfLifeTest - 2018.02.26 at 16h 06m 11s.xml">
511 495
       <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
512 496
     </history-entry>
513
-    <history-entry file="ConwayGameOfLifeTest - 2018.02.26 at 15h 59m 00s.xml">
514
-      <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
497
+    <history-entry file="ConwayGameOfLifeTest_copyAndZeroOutTest - 2018.03.10 at 13h 58m 29s.xml">
498
+      <configuration name="ConwayGameOfLifeTest.copyAndZeroOutTest" configurationId="JUnit" />
515 499
     </history-entry>
516
-    <history-entry file="ConwayGameOfLifeTest - 2018.02.26 at 16h 02m 03s.xml">
517
-      <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
500
+    <history-entry file="ConwayGameOfLifeTest_copyAndZeroOutTest - 2018.03.10 at 14h 02m 40s.xml">
501
+      <configuration name="ConwayGameOfLifeTest.copyAndZeroOutTest" configurationId="JUnit" />
518 502
     </history-entry>
519
-    <history-entry file="ConwayGameOfLifeTest - 2018.02.26 at 16h 03m 01s.xml">
520
-      <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
503
+    <history-entry file="ConwayGameOfLifeTest_copyAndZeroOutTest - 2018.03.10 at 14h 08m 46s.xml">
504
+      <configuration name="ConwayGameOfLifeTest.copyAndZeroOutTest" configurationId="JUnit" />
521 505
     </history-entry>
522
-    <history-entry file="ConwayGameOfLifeTest - 2018.02.26 at 16h 05m 07s.xml">
523
-      <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
524
-    </history-entry>
525
-    <history-entry file="ConwayGameOfLifeTest - 2018.02.26 at 16h 06m 11s.xml">
526
-      <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
506
+    <history-entry file="ConwayGameOfLifeTest_copyAndZeroOutTest - 2018.03.12 at 18h 54m 28s.xml">
507
+      <configuration name="ConwayGameOfLifeTest.copyAndZeroOutTest" configurationId="JUnit" />
527 508
     </history-entry>
528 509
     <history-entry file="ConwayGameOfLifeTest_runTest - 2018.02.26 at 15h 41m 14s.xml">
529 510
       <configuration name="ConwayGameOfLifeTest.runTest" configurationId="JUnit" />
530 511
     </history-entry>
512
+    <history-entry file="ConwayGameOfLifeTest_runTest1 - 2018.03.09 at 16h 56m 05s.xml">
513
+      <configuration name="ConwayGameOfLifeTest.runTest1" configurationId="JUnit" />
514
+    </history-entry>
531 515
     <history-entry file="ConwayGameOfLifeTest_runTest2 - 2018.02.26 at 15h 42m 02s.xml">
532 516
       <configuration name="ConwayGameOfLifeTest.runTest2" configurationId="JUnit" />
533 517
     </history-entry>
534 518
     <history-entry file="ConwayGameOfLifeTest_runTest2 - 2018.02.26 at 15h 42m 18s.xml">
535 519
       <configuration name="ConwayGameOfLifeTest.runTest2" configurationId="JUnit" />
536 520
     </history-entry>
521
+    <history-entry file="ConwayGameOfLifeTest_runTest2 - 2018.03.09 at 16h 56m 13s.xml">
522
+      <configuration name="ConwayGameOfLifeTest.runTest2" configurationId="JUnit" />
523
+    </history-entry>
537 524
   </component>
538 525
   <component name="TimeTrackingManager">
539
-    <option name="totallyTimeSpent" value="14517000" />
526
+    <option name="totallyTimeSpent" value="37006000" />
540 527
   </component>
541 528
   <component name="ToolWindowManager">
542
-    <frame x="82" y="32" width="1440" height="821" extended-state="0" />
529
+    <frame x="216" y="-1013" width="1447" height="985" extended-state="0" />
543 530
     <editor active="true" />
544 531
     <layout>
545
-      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
532
+      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
546 533
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
547
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32833788" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
548
-      <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
549
-      <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
550
-      <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
551
-      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
552
-      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
553
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32561308" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
554
-      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
555
-      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32970026" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
556
-      <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
557
-      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
558
-      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
559
-      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
534
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3258427" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
535
+      <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
536
+      <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
537
+      <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
538
+      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
539
+      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
540
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18876405" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
541
+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
542
+      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32970026" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
543
+      <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
544
+      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
545
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.13736655" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
546
+      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
560 547
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
561 548
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
562
-      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
563
-      <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
549
+      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
550
+      <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
564 551
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
565
-      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
552
+      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
566 553
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
567
-      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
568 554
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
569 555
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
570
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
556
+      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
571 557
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
558
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
572 559
     </layout>
573 560
   </component>
574 561
   <component name="TypeScriptGeneratedFilesManager">
@@ -584,30 +571,118 @@
584 571
     <watches-manager />
585 572
   </component>
586 573
   <component name="editorHistoryManager">
587
-    <entry file="file://$PROJECT_DIR$/pom.xml">
574
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
588 575
       <provider selected="true" editor-type-id="text-editor">
589
-        <state relative-caret-position="187">
590
-          <caret line="11" column="10" lean-forward="false" selection-start-line="11" selection-start-column="10" selection-end-line="11" selection-end-column="10" />
591
-          <folding />
576
+        <state relative-caret-position="1140">
577
+          <caret line="81" column="15" lean-forward="true" selection-start-line="81" selection-start-column="15" selection-end-line="81" selection-end-column="15" />
578
+          <folding>
579
+            <element signature="imports" expanded="true" />
580
+          </folding>
592 581
         </state>
593 582
       </provider>
594 583
     </entry>
595
-    <entry file="file://$PROJECT_DIR$/src/main/java/LifeStarts.java">
584
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java">
596 585
       <provider selected="true" editor-type-id="text-editor">
597
-        <state relative-caret-position="272">
598
-          <caret line="16" column="5" lean-forward="false" selection-start-line="7" selection-start-column="0" selection-end-line="16" selection-end-column="5" />
599
-          <folding />
586
+        <state relative-caret-position="855">
587
+          <caret line="58" column="47" lean-forward="true" selection-start-line="54" selection-start-column="31" selection-end-line="58" selection-end-column="47" />
588
+          <folding>
589
+            <element signature="imports" expanded="true" />
590
+          </folding>
600 591
         </state>
601 592
       </provider>
602 593
     </entry>
603
-    <entry file="file://$PROJECT_DIR$/src/main/java/Life.java">
594
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java">
604 595
       <provider selected="true" editor-type-id="text-editor">
605
-        <state relative-caret-position="669">
606
-          <caret line="87" column="5" lean-forward="true" selection-start-line="47" selection-start-column="0" selection-end-line="87" selection-end-column="5" />
596
+        <state relative-caret-position="1305">
597
+          <caret line="98" column="85" lean-forward="true" selection-start-line="98" selection-start-column="85" selection-end-line="98" selection-end-column="85" />
598
+          <folding>
599
+            <element signature="imports" expanded="true" />
600
+            <element signature="e#2757#2758#0" expanded="true" />
601
+            <element signature="e#2794#2795#0" expanded="true" />
602
+            <element signature="e#2839#2840#0" expanded="true" />
603
+            <element signature="e#2879#2880#0" expanded="true" />
604
+          </folding>
605
+        </state>
606
+      </provider>
607
+    </entry>
608
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
609
+      <provider selected="true" editor-type-id="text-editor">
610
+        <state relative-caret-position="360">
611
+          <caret line="26" column="0" lean-forward="false" selection-start-line="26" selection-start-column="0" selection-end-line="26" selection-end-column="0" />
612
+          <folding>
613
+            <element signature="imports" expanded="true" />
614
+          </folding>
615
+        </state>
616
+      </provider>
617
+    </entry>
618
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java">
619
+      <provider selected="true" editor-type-id="text-editor">
620
+        <state relative-caret-position="360">
621
+          <caret line="28" column="53" lean-forward="true" selection-start-line="28" selection-start-column="53" selection-end-line="28" selection-end-column="53" />
622
+          <folding>
623
+            <element signature="imports" expanded="true" />
624
+            <element signature="e#2757#2758#0" expanded="true" />
625
+            <element signature="e#2794#2795#0" expanded="true" />
626
+            <element signature="e#2839#2840#0" expanded="true" />
627
+            <element signature="e#2879#2880#0" expanded="true" />
628
+          </folding>
629
+        </state>
630
+      </provider>
631
+    </entry>
632
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java">
633
+      <provider selected="true" editor-type-id="text-editor">
634
+        <state relative-caret-position="795">
635
+          <caret line="54" column="8" lean-forward="false" selection-start-line="54" selection-start-column="8" selection-end-line="64" selection-end-column="49" />
636
+          <folding>
637
+            <element signature="imports" expanded="true" />
638
+          </folding>
639
+        </state>
640
+      </provider>
641
+    </entry>
642
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java">
643
+      <provider selected="true" editor-type-id="text-editor">
644
+        <state relative-caret-position="240">
645
+          <caret line="17" column="42" lean-forward="false" selection-start-line="17" selection-start-column="42" selection-end-line="17" selection-end-column="42" />
646
+          <folding>
647
+            <element signature="imports" expanded="true" />
648
+          </folding>
649
+        </state>
650
+      </provider>
651
+    </entry>
652
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java">
653
+      <provider selected="true" editor-type-id="text-editor">
654
+        <state relative-caret-position="300">
655
+          <caret line="20" column="0" lean-forward="false" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
656
+          <folding>
657
+            <element signature="imports" expanded="true" />
658
+            <element signature="e#2757#2758#0" expanded="true" />
659
+            <element signature="e#2794#2795#0" expanded="true" />
660
+            <element signature="e#2839#2840#0" expanded="true" />
661
+            <element signature="e#2879#2880#0" expanded="true" />
662
+          </folding>
663
+        </state>
664
+      </provider>
665
+    </entry>
666
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
667
+      <provider selected="true" editor-type-id="text-editor">
668
+        <state relative-caret-position="450">
669
+          <caret line="32" column="32" lean-forward="false" selection-start-line="32" selection-start-column="32" selection-end-line="32" selection-end-column="32" />
670
+          <folding>
671
+            <element signature="imports" expanded="true" />
672
+          </folding>
673
+        </state>
674
+      </provider>
675
+    </entry>
676
+    <entry file="file://$PROJECT_DIR$/pom.xml">
677
+      <provider selected="true" editor-type-id="text-editor">
678
+        <state relative-caret-position="187">
679
+          <caret line="11" column="10" lean-forward="false" selection-start-line="11" selection-start-column="10" selection-end-line="11" selection-end-column="10" />
607 680
           <folding />
608 681
         </state>
609 682
       </provider>
610 683
     </entry>
684
+    <entry file="file://$PROJECT_DIR$/src/main/java/LifeStarts.java" />
685
+    <entry file="file://$PROJECT_DIR$/src/main/java/Life.java" />
611 686
     <entry file="uml://JAVA/com.zipcodeconway.ConwayGameOfLife">
612 687
       <provider selected="true" editor-type-id="UmlEditorProvider">
613 688
         <state>
@@ -629,39 +704,24 @@
629 704
         </state>
630 705
       </provider>
631 706
     </entry>
632
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/README.md">
633
-      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
634
-        <state split_layout="SPLIT">
635
-          <first_editor relative-caret-position="236">
636
-            <caret line="52" column="194" lean-forward="false" selection-start-line="52" selection-start-column="194" selection-end-line="52" selection-end-column="194" />
637
-            <folding />
638
-          </first_editor>
639
-          <second_editor />
640
-        </state>
641
-      </provider>
642
-    </entry>
643
-    <entry file="file://$USER_HOME$/Downloads/ConwayLifeRandomat50.png">
644
-      <provider selected="true" editor-type-id="images">
645
-        <state />
646
-      </provider>
647
-    </entry>
648
-    <entry file="file://$USER_HOME$/Documents/gitea/gitea/custom/public/img/ConwayLifeUML.png">
649
-      <provider selected="true" editor-type-id="images">
650
-        <state />
651
-      </provider>
652
-    </entry>
653
-    <entry file="file://$PROJECT_DIR$/src/main/java/GameofLife.java">
707
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/README.md" />
708
+    <entry file="file://$USER_HOME$/Downloads/ConwayLifeRandomat50.png" />
709
+    <entry file="file://$USER_HOME$/Documents/gitea/gitea/custom/public/img/ConwayLifeUML.png" />
710
+    <entry file="file://$PROJECT_DIR$/src/main/java/GameofLife.java" />
711
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
654 712
       <provider selected="true" editor-type-id="text-editor">
655
-        <state relative-caret-position="334">
656
-          <caret line="83" column="17" lean-forward="false" selection-start-line="82" selection-start-column="30" selection-end-line="83" selection-end-column="17" />
657
-          <folding />
713
+        <state relative-caret-position="378">
714
+          <caret line="66" column="21" lean-forward="true" selection-start-line="66" selection-start-column="21" selection-end-line="66" selection-end-column="21" />
715
+          <folding>
716
+            <element signature="imports" expanded="true" />
717
+          </folding>
658 718
         </state>
659 719
       </provider>
660 720
     </entry>
661 721
     <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java">
662 722
       <provider selected="true" editor-type-id="text-editor">
663
-        <state relative-caret-position="289">
664
-          <caret line="17" column="42" lean-forward="false" selection-start-line="17" selection-start-column="42" selection-end-line="17" selection-end-column="42" />
723
+        <state relative-caret-position="870">
724
+          <caret line="58" column="47" lean-forward="false" selection-start-line="54" selection-start-column="31" selection-end-line="58" selection-end-column="47" />
665 725
           <folding>
666 726
             <element signature="imports" expanded="true" />
667 727
           </folding>
@@ -670,26 +730,18 @@
670 730
     </entry>
671 731
     <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java">
672 732
       <provider selected="true" editor-type-id="text-editor">
673
-        <state relative-caret-position="164">
674
-          <caret line="20" column="0" lean-forward="false" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
733
+        <state relative-caret-position="15">
734
+          <caret line="101" column="0" lean-forward="true" selection-start-line="101" selection-start-column="0" selection-end-line="101" selection-end-column="0" />
675 735
           <folding>
676
-            <element signature="e#585#586#0" expanded="true" />
677
-            <element signature="e#676#677#0" expanded="true" />
678
-            <element signature="e#712#713#0" expanded="true" />
679
-            <element signature="e#1429#1430#0" expanded="true" />
680
-            <element signature="e#1453#1454#0" expanded="true" />
736
+            <element signature="imports" expanded="true" />
737
+            <element signature="e#2757#2758#0" expanded="true" />
738
+            <element signature="e#2794#2795#0" expanded="true" />
739
+            <element signature="e#2839#2840#0" expanded="true" />
740
+            <element signature="e#2879#2880#0" expanded="true" />
681 741
           </folding>
682 742
         </state>
683 743
       </provider>
684 744
     </entry>
685
-    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
686
-      <provider selected="true" editor-type-id="text-editor">
687
-        <state relative-caret-position="510">
688
-          <caret line="32" column="32" lean-forward="false" selection-start-line="32" selection-start-column="32" selection-end-line="32" selection-end-column="32" />
689
-          <folding />
690
-        </state>
691
-      </provider>
692
-    </entry>
693 745
   </component>
694 746
   <component name="masterDetails">
695 747
     <states>

+ 135
- 9
src/main/java/com/zipcodeconway/ConwayGameOfLife.java 查看文件

@@ -1,32 +1,88 @@
1 1
 package com.zipcodeconway;
2 2
 
3
+import java.util.Arrays;
4
+import java.util.Random;
5
+
3 6
 public class ConwayGameOfLife {
4 7
 
5
-    public ConwayGameOfLife(Integer dimension) {
6
-     }
8
+    private SimpleWindow simpleWindow;
7 9
 
8
-    public ConwayGameOfLife(Integer dimension, int[][] startmatrix) {
10
+    private Integer dimension;
11
+    private int[][] currentGeneration;
12
+    private int[][] nextGeneration;
13
+    private int[][] nextArrayAfter;
14
+    private int[][] currentArrayAfter;
15
+
16
+    public ConwayGameOfLife(Integer dimension) {
17
+        this.simpleWindow = new SimpleWindow(dimension);
18
+        this.currentGeneration = createRandomStart(dimension);
19
+        this.nextGeneration = new int[dimension][dimension];
9 20
     }
10 21
 
11
-    public static void main(String[] args) {
12
-        ConwayGameOfLife sim = new ConwayGameOfLife(50);
13
-        int[][] endingWorld = sim.simulate(50);
22
+    public ConwayGameOfLife(Integer dimension, int[][] startMatrix) {
23
+        this.dimension = dimension;
24
+        this.currentGeneration = startMatrix;
14 25
     }
15 26
 
16 27
     // Contains the logic for the starting scenario.
17 28
     // Which cells are alive or dead in generation 0.
18 29
     // allocates and returns the starting matrix of size 'dimension'
19 30
     private int[][] createRandomStart(Integer dimension) {
20
-        return new int[1][1];
31
+        int[][] randomArray = new int[dimension][dimension];
32
+
33
+        Random random = new Random();
34
+        for (int i = 0; i < randomArray.length; i++) {
35
+            for (int j = 0; j < randomArray[i].length; j++) {
36
+                int zeroOrOne = random.nextInt(2);
37
+                randomArray[i][j] = zeroOrOne;
38
+            }
39
+        }
40
+        return randomArray;
21 41
     }
22 42
 
23 43
     public int[][] simulate(Integer maxGenerations) {
24
-        return new int[1][1];
44
+        int generation = 0;
45
+        while (generation <= maxGenerations) {
46
+            this.simpleWindow.display(currentGeneration, generation);
47
+            for (int i = 0; i < currentGeneration.length; i++) {
48
+                for (int j = 0; j < currentGeneration.length; j++) {
49
+                    nextGeneration[i][j] = isAlive(i, j, currentGeneration);
50
+                }
51
+            }
52
+            copyAndZeroOut(nextGeneration, currentGeneration);
53
+            this.simpleWindow.sleep(125);
54
+            generation++;
55
+        }
56
+        return currentGeneration;
25 57
     }
26 58
 
27 59
     // copy the values of 'next' matrix to 'current' matrix,
28 60
     // and then zero out the contents of 'next' matrix
29 61
     public void copyAndZeroOut(int [][] next, int[][] current) {
62
+        this.nextArrayAfter = new int[next.length][next.length];
63
+        this.currentArrayAfter = new int[next.length][next.length];
64
+
65
+        for (int i = 0; i < current.length; i++) {
66
+            for (int j = 0; j < current[i].length; j++) {
67
+                current[i][j] = next[i][j];
68
+                currentArrayAfter[i][j] = next[i][j];
69
+            }
70
+        }
71
+
72
+        for (int i = 0; i < next.length; i++) {
73
+            for (int j = 0; j < next[i].length; j++) {
74
+                next[i][j] = 0;
75
+                nextArrayAfter[i][j] = 0;
76
+            }
77
+        }
78
+    }
79
+
80
+    public int[][] getNextArrayAfter() {
81
+        return nextArrayAfter;
82
+    }
83
+
84
+    public int[][] getCurrentArrayAfter() {
85
+        return currentArrayAfter;
30 86
     }
31 87
 
32 88
     // Calculate if an individual cell should be alive in the next generation.
@@ -38,6 +94,76 @@ public class ConwayGameOfLife {
38 94
 		Any dead cell with exactly three live neighbours cells will come to life.
39 95
 	*/
40 96
     private int isAlive(int row, int col, int[][] world) {
41
-        return 0;
97
+        int living = 0;
98
+
99
+        int west = row - 1;
100
+        int east = row + 1;
101
+        int north = col - 1;
102
+        int south = col + 1;
103
+
104
+        if(west == -1) {
105
+            west = world.length - 1;
106
+        }
107
+        if(east == world.length){
108
+            east = 0;
109
+        }
110
+        if(north == -1) {
111
+            north = world[row].length - 1;
112
+        }
113
+        if(south == world[row].length) {
114
+            south = 0;
115
+        }
116
+
117
+        if(world[west][north] == 1) {
118
+            living++;
119
+        }
120
+        if(world[west][col] == 1) {
121
+            living++;
122
+        }
123
+        if(world[west][south] == 1) {
124
+            living++;
125
+        }
126
+        if(world[row][north] == 1) {
127
+            living++;
128
+        }
129
+        if(world[row][south] == 1) {
130
+            living++;
131
+        }
132
+        if(world[east][north] == 1) {
133
+            living++;
134
+        }
135
+        if(world[east][col] == 1) {
136
+            living++;
137
+        }
138
+        if(world[east][south] == 1) {
139
+            living++;
140
+        }
141
+
142
+        if(living < 2) {
143
+            return 0;
144
+        } else if (living > 3) {
145
+            return 0;
146
+        } else if (living == 3) {
147
+            return 1;
148
+        } else {
149
+            return world[row][col];
150
+        }
151
+    }
152
+
153
+
154
+    public String rowsToString(int[][] arrayToPrint) {
155
+        StringBuilder sb = new StringBuilder();
156
+        for (int i = 0; i < arrayToPrint.length; i++) {
157
+            sb.append(Arrays.toString(arrayToPrint[i]) + "\n");
158
+        }
159
+        sb.deleteCharAt(sb.length() - 1);
160
+        return sb.toString();
42 161
     }
162
+
163
+    public static void main(String[] args) {
164
+        ConwayGameOfLife sim = new ConwayGameOfLife(50);
165
+        int[][] endingWorld = sim.simulate(500);
166
+
167
+    }
168
+
43 169
 }

+ 19
- 0
src/main/java/com/zipcodeconway/SimpleWindow.java 查看文件

@@ -48,6 +48,25 @@ public class SimpleWindow {
48 48
                 }
49 49
             }
50 50
         }
51
+    }
52
+
53
+    public static void main(String[] args) {
54
+        SimpleWindow sw = new SimpleWindow(40);
55
+        int[][] testArray1 = { {0, 0, 0, 0, 0},
56
+                               {0, 0, 1, 0, 0},
57
+                               {0, 0, 1, 0, 0},
58
+                               {0, 0, 1, 0, 0},
59
+                               {0, 0, 0, 0, 0} };
60
+
61
+        int[][] testArray2 = { {0, 0, 0, 0, 0},
62
+                               {0, 0, 1, 0, 0},
63
+                               {0, 1, 1, 1, 0},
64
+                               {0, 0, 1, 0, 0},
65
+                               {0, 0, 0, 0, 0} };
66
+
67
+        sw.display(testArray1, 125);
68
+        sw.display(testArray2, 125);
69
+
51 70
 
52 71
     }
53 72
 }

+ 46
- 0
src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java 查看文件

@@ -1,11 +1,16 @@
1 1
 package com.zipcodeconway;
2 2
 
3
+import org.junit.Assert;
3 4
 import org.junit.Test;
4 5
 
5 6
 import static org.junit.Assert.*;
6 7
 
8
+import com.zipcodeconway.ConwayGameOfLife;
9
+
7 10
 public class ConwayGameOfLifeTest {
8 11
 
12
+    private ConwayGameOfLife sim;
13
+
9 14
     @Test
10 15
     public void runTest1() {
11 16
         int[][] start = {
@@ -43,4 +48,45 @@ public class ConwayGameOfLifeTest {
43 48
         int[][] results = sim.simulate(10);
44 49
         assertTrue(java.util.Arrays.deepEquals(results, expected));
45 50
     }
51
+
52
+    @Test
53
+    public void copyAndZeroOutTest() {
54
+        // Given
55
+        int[][] expectedNextArrayBefore = {
56
+                {0, 0, 0, 0, 0},
57
+                {0, 0, 1, 0, 0},
58
+                {0, 0, 1, 0, 0},
59
+                {0, 0, 1, 0, 0},
60
+                {0, 0, 0, 0, 0} };
61
+        int[][] expectedNextArrayAfter = {
62
+                {0, 0, 0, 0, 0},
63
+                {0, 0, 0, 0, 0},
64
+                {0, 0, 0, 0, 0},
65
+                {0, 0, 0, 0, 0},
66
+                {0, 0, 0, 0, 0} };
67
+        int[][] expectedCurrentArrayBefore = {
68
+                {0, 0, 0, 0, 0},
69
+                {0, 0, 0, 0, 0},
70
+                {0, 1, 1, 1, 0},
71
+                {0, 0, 0, 0, 0},
72
+                {0, 0, 0, 0, 0} };
73
+        int[][] expectedCurrentArrayAfter = {
74
+                {0, 0, 0, 0, 0},
75
+                {0, 0, 1, 0, 0},
76
+                {0, 0, 1, 0, 0},
77
+                {0, 0, 1, 0, 0},
78
+                {0, 0, 0, 0, 0} };
79
+        sim = new ConwayGameOfLife(5, expectedCurrentArrayBefore);
80
+        String expectedNextArray = sim.rowsToString(expectedNextArrayAfter);
81
+        String expectedCurrentArray = sim.rowsToString(expectedCurrentArrayAfter);
82
+        // When
83
+        sim.copyAndZeroOut(expectedNextArrayBefore, expectedCurrentArrayBefore);
84
+        String actualNextArray = sim.rowsToString(sim.getNextArrayAfter());
85
+        String actualCurrentArray = sim.rowsToString(sim.getCurrentArrayAfter());
86
+        // Then
87
+        Assert.assertEquals(expectedNextArray, actualNextArray);
88
+        Assert.assertEquals(expectedCurrentArray, actualCurrentArray);
89
+
90
+    }
91
+
46 92
 }