Keith Brinker 6 年之前
父節點
當前提交
50bf50b431

+ 144
- 186
.idea/workspace.xml 查看文件

@@ -1,7 +1,12 @@
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="" afterPath="$PROJECT_DIR$/src/main/java/com/zipcodeconway/Neighbors.java" />
6
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
7
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java" afterPath="$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java" />
8
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java" afterPath="$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java" />
9
+    </list>
5 10
     <ignored path="$PROJECT_DIR$/target/" />
6 11
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
7 12
     <option name="TRACKING_ENABLED" value="true" />
@@ -11,12 +16,12 @@
11 16
     <option name="LAST_RESOLUTION" value="IGNORE" />
12 17
   </component>
13 18
   <component name="FileEditorManager">
14
-    <leaf>
15
-      <file leaf-file-name="SimpleWindow.java" pinned="false" current-in-tab="false">
19
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
20
+      <file leaf-file-name="SimpleWindow.java" pinned="false" current-in-tab="true">
16 21
         <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java">
17 22
           <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" />
23
+            <state relative-caret-position="561">
24
+              <caret line="45" column="43" lean-forward="false" selection-start-line="45" selection-start-column="43" selection-end-line="45" selection-end-column="43" />
20 25
               <folding>
21 26
                 <element signature="imports" expanded="true" />
22 27
               </folding>
@@ -27,61 +32,33 @@
27 32
       <file leaf-file-name="ConwayGameOfLife.java" pinned="false" current-in-tab="false">
28 33
         <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java">
29 34
           <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>
35
+            <state relative-caret-position="1275">
36
+              <caret line="85" column="0" lean-forward="false" selection-start-line="85" selection-start-column="0" selection-end-line="85" selection-end-column="0" />
37
+              <folding />
62 38
             </state>
63 39
           </provider>
64 40
         </entry>
65 41
       </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 />
42
+      <file leaf-file-name="Neighbors.java" pinned="false" current-in-tab="false">
43
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/Neighbors.java">
44
+          <provider selected="true" editor-type-id="text-editor">
45
+            <state relative-caret-position="0">
46
+              <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="16" selection-end-column="0" />
47
+              <folding>
48
+                <element signature="e#0#523#0" expanded="true" />
49
+              </folding>
75 50
             </state>
76 51
           </provider>
77 52
         </entry>
78 53
       </file>
79
-      <file leaf-file-name="ConwayGameOfLifeTest.java" pinned="false" current-in-tab="true">
54
+      <file leaf-file-name="ConwayGameOfLifeTest.java" pinned="false" current-in-tab="false">
80 55
         <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
81 56
           <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 />
57
+            <state relative-caret-position="345">
58
+              <caret line="23" column="0" lean-forward="false" selection-start-line="23" selection-start-column="0" selection-end-line="23" selection-end-column="0" />
59
+              <folding>
60
+                <element signature="imports" expanded="true" />
61
+              </folding>
85 62
             </state>
86 63
           </provider>
87 64
         </entry>
@@ -92,8 +69,8 @@
92 69
     <option name="RECENT_TEMPLATES">
93 70
       <list>
94 71
         <option value="Arquillian JUnit Test Class" />
95
-        <option value="Class" />
96 72
         <option value="JUnit4 Test Class" />
73
+        <option value="Class" />
97 74
       </list>
98 75
     </option>
99 76
   </component>
@@ -126,9 +103,10 @@
126 103
         <option value="$PROJECT_DIR$/src/main/java/ConwayGameOfLife.java" />
127 104
         <option value="$PROJECT_DIR$/src/main/java/Life.java" />
128 105
         <option value="$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java" />
129
-        <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java" />
130 106
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/README.md" />
107
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/Neighbors.java" />
131 108
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java" />
109
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java" />
132 110
       </list>
133 111
     </option>
134 112
   </component>
@@ -139,10 +117,10 @@
139 117
     <sorting>DEFINITION_ORDER</sorting>
140 118
   </component>
141 119
   <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" />
120
+    <option name="x" value="-204" />
121
+    <option name="y" value="-1047" />
122
+    <option name="width" value="1847" />
123
+    <option name="height" value="1032" />
146 124
   </component>
147 125
   <component name="ProjectView">
148 126
     <navigator currentView="ProjectPane" proportions="" version="1">
@@ -159,68 +137,25 @@
159 137
       <foldersAlwaysOnTop value="true" />
160 138
     </navigator>
161 139
     <panes>
140
+      <pane id="Scope" />
141
+      <pane id="PackagesPane" />
162 142
       <pane id="ProjectPane">
163 143
         <subPane>
164 144
           <expand>
165 145
             <path>
166
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
167
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
168
-            </path>
169
-            <path>
170
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
171
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
172
-              <item name="src" type="462c0819:PsiDirectoryNode" />
173
-            </path>
174
-            <path>
175
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
176
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
177
-              <item name="src" type="462c0819:PsiDirectoryNode" />
178
-              <item name="main" type="462c0819:PsiDirectoryNode" />
179
-            </path>
180
-            <path>
181
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
182
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
183
-              <item name="src" type="462c0819:PsiDirectoryNode" />
184
-              <item name="main" type="462c0819:PsiDirectoryNode" />
185
-              <item name="java" type="462c0819:PsiDirectoryNode" />
146
+              <item name="ConwayGameOfLife" type="b2602c69:ProjectViewProjectNode" />
147
+              <item name="ConwayGameOfLife" type="462c0819:PsiDirectoryNode" />
186 148
             </path>
187 149
             <path>
188
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
189
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
190
-              <item name="src" type="462c0819:PsiDirectoryNode" />
191
-              <item name="main" type="462c0819:PsiDirectoryNode" />
192
-              <item name="java" type="462c0819:PsiDirectoryNode" />
193
-              <item name="zipcodeconway" type="462c0819:PsiDirectoryNode" />
194
-            </path>
195
-            <path>
196
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
197
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
198
-              <item name="src" type="462c0819:PsiDirectoryNode" />
199
-              <item name="test" type="462c0819:PsiDirectoryNode" />
200
-            </path>
201
-            <path>
202
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
203
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
204
-              <item name="src" type="462c0819:PsiDirectoryNode" />
205
-              <item name="test" type="462c0819:PsiDirectoryNode" />
206
-              <item name="java" type="462c0819:PsiDirectoryNode" />
207
-            </path>
208
-            <path>
209
-              <item name="Game-Of-Life-Java" type="b2602c69:ProjectViewProjectNode" />
210
-              <item name="Game-Of-Life-Java" type="462c0819:PsiDirectoryNode" />
211
-              <item name="src" type="462c0819:PsiDirectoryNode" />
212
-              <item name="test" type="462c0819:PsiDirectoryNode" />
213
-              <item name="java" type="462c0819:PsiDirectoryNode" />
214
-              <item name="zipcodeconway" type="462c0819:PsiDirectoryNode" />
150
+              <item name="ConwayGameOfLife" type="b2602c69:ProjectViewProjectNode" />
151
+              <item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
215 152
             </path>
216 153
           </expand>
217 154
           <select />
218 155
         </subPane>
219 156
       </pane>
220
-      <pane id="PackagesPane" />
221
-      <pane id="AndroidView" />
222 157
       <pane id="Scratches" />
223
-      <pane id="Scope" />
158
+      <pane id="AndroidView" />
224 159
     </panes>
225 160
   </component>
226 161
   <component name="PropertiesComponent">
@@ -260,7 +195,7 @@
260 195
       </list>
261 196
     </option>
262 197
   </component>
263
-  <component name="RunManager" selected="JUnit.ConwayGameOfLifeTest">
198
+  <component name="RunManager" selected="Application.ConwayGameOfLife">
264 199
     <configuration default="true" type="Applet" factoryName="Applet">
265 200
       <option name="HTML_USED" value="false" />
266 201
       <option name="WIDTH" value="400" />
@@ -481,8 +416,8 @@
481 416
     </list>
482 417
     <recent_temporary>
483 418
       <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" />
419
+        <item index="0" class="java.lang.String" itemvalue="Application.ConwayGameOfLife" />
420
+        <item index="1" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest" />
486 421
         <item index="2" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest2" />
487 422
         <item index="3" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest" />
488 423
         <item index="4" class="java.lang.String" itemvalue="Application.GameofLife" />
@@ -503,30 +438,34 @@
503 438
       <option name="presentableId" value="Default" />
504 439
       <updated>1519668901598</updated>
505 440
       <workItem from="1519668902904" duration="14517000" />
441
+      <workItem from="1520878157791" duration="14119000" />
506 442
     </task>
507 443
     <servers />
508 444
   </component>
509 445
   <component name="TestHistory">
510
-    <history-entry file="ConwayGameOfLifeTest - 2018.02.26 at 15h 45m 01s.xml">
446
+    <history-entry file="ConwayGameOfLifeTest - 2018.03.12 at 14h 19m 08s.xml">
511 447
       <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
512 448
     </history-entry>
513
-    <history-entry file="ConwayGameOfLifeTest - 2018.02.26 at 15h 59m 00s.xml">
449
+    <history-entry file="ConwayGameOfLifeTest - 2018.03.12 at 16h 02m 43s.xml">
514 450
       <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
515 451
     </history-entry>
516
-    <history-entry file="ConwayGameOfLifeTest - 2018.02.26 at 16h 02m 03s.xml">
452
+    <history-entry file="ConwayGameOfLifeTest - 2018.03.12 at 17h 37m 10s.xml">
517 453
       <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
518 454
     </history-entry>
519
-    <history-entry file="ConwayGameOfLifeTest - 2018.02.26 at 16h 03m 01s.xml">
455
+    <history-entry file="ConwayGameOfLifeTest - 2018.03.12 at 17h 42m 54s.xml">
520 456
       <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
521 457
     </history-entry>
522
-    <history-entry file="ConwayGameOfLifeTest - 2018.02.26 at 16h 05m 07s.xml">
458
+    <history-entry file="ConwayGameOfLifeTest - 2018.03.12 at 17h 46m 30s.xml">
523 459
       <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
524 460
     </history-entry>
525
-    <history-entry file="ConwayGameOfLifeTest - 2018.02.26 at 16h 06m 11s.xml">
461
+    <history-entry file="ConwayGameOfLifeTest - 2018.03.12 at 17h 52m 12s.xml">
526 462
       <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
527 463
     </history-entry>
528
-    <history-entry file="ConwayGameOfLifeTest_runTest - 2018.02.26 at 15h 41m 14s.xml">
529
-      <configuration name="ConwayGameOfLifeTest.runTest" configurationId="JUnit" />
464
+    <history-entry file="ConwayGameOfLifeTest - 2018.03.12 at 17h 54m 50s.xml">
465
+      <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
466
+    </history-entry>
467
+    <history-entry file="ConwayGameOfLifeTest - 2018.03.12 at 17h 58m 04s.xml">
468
+      <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
530 469
     </history-entry>
531 470
     <history-entry file="ConwayGameOfLifeTest_runTest2 - 2018.02.26 at 15h 42m 02s.xml">
532 471
       <configuration name="ConwayGameOfLifeTest.runTest2" configurationId="JUnit" />
@@ -536,39 +475,38 @@
536 475
     </history-entry>
537 476
   </component>
538 477
   <component name="TimeTrackingManager">
539
-    <option name="totallyTimeSpent" value="14517000" />
478
+    <option name="totallyTimeSpent" value="28636000" />
540 479
   </component>
541 480
   <component name="ToolWindowManager">
542
-    <frame x="82" y="32" width="1440" height="821" extended-state="0" />
543
-    <editor active="true" />
481
+    <frame x="-204" y="-1047" width="1847" height="1032" extended-state="0" />
544 482
     <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" />
483
+      <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 484
       <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" />
485
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.328125" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
486
+      <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" />
487
+      <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" />
488
+      <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" />
489
+      <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" />
490
+      <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" />
491
+      <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" />
492
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.253125" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
493
+      <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" />
494
+      <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" />
495
+      <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" />
496
+      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.34434217" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
497
+      <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 498
       <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 499
       <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" />
500
+      <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" />
501
+      <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" />
502
+      <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" />
564 503
       <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" />
566 504
       <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 505
       <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 506
       <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" />
507
+      <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 508
       <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" />
509
+      <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 510
     </layout>
573 511
   </component>
574 512
   <component name="TypeScriptGeneratedFilesManager">
@@ -584,30 +522,44 @@
584 522
     <watches-manager />
585 523
   </component>
586 524
   <component name="editorHistoryManager">
587
-    <entry file="file://$PROJECT_DIR$/pom.xml">
525
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java">
588 526
       <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 />
527
+        <state relative-caret-position="240">
528
+          <caret line="17" column="42" lean-forward="false" selection-start-line="17" selection-start-column="42" selection-end-line="17" selection-end-column="42" />
529
+          <folding>
530
+            <element signature="imports" expanded="true" />
531
+          </folding>
592 532
         </state>
593 533
       </provider>
594 534
     </entry>
595
-    <entry file="file://$PROJECT_DIR$/src/main/java/LifeStarts.java">
535
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java">
596 536
       <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" />
537
+        <state relative-caret-position="300">
538
+          <caret line="20" column="0" lean-forward="false" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
599 539
           <folding />
600 540
         </state>
601 541
       </provider>
602 542
     </entry>
603
-    <entry file="file://$PROJECT_DIR$/src/main/java/Life.java">
543
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
544
+      <provider selected="true" editor-type-id="text-editor">
545
+        <state relative-caret-position="450">
546
+          <caret line="32" column="32" lean-forward="false" selection-start-line="32" selection-start-column="32" selection-end-line="32" selection-end-column="32" />
547
+          <folding>
548
+            <element signature="imports" expanded="true" />
549
+          </folding>
550
+        </state>
551
+      </provider>
552
+    </entry>
553
+    <entry file="file://$PROJECT_DIR$/pom.xml">
604 554
       <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" />
555
+        <state relative-caret-position="187">
556
+          <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 557
           <folding />
608 558
         </state>
609 559
       </provider>
610 560
     </entry>
561
+    <entry file="file://$PROJECT_DIR$/src/main/java/LifeStarts.java" />
562
+    <entry file="file://$PROJECT_DIR$/src/main/java/Life.java" />
611 563
     <entry file="uml://JAVA/com.zipcodeconway.ConwayGameOfLife">
612 564
       <provider selected="true" editor-type-id="UmlEditorProvider">
613 565
         <state>
@@ -629,64 +581,70 @@
629 581
         </state>
630 582
       </provider>
631 583
     </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 />
584
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/README.md" />
585
+    <entry file="file://$USER_HOME$/Downloads/ConwayLifeRandomat50.png" />
586
+    <entry file="file://$USER_HOME$/Documents/gitea/gitea/custom/public/img/ConwayLifeUML.png" />
587
+    <entry file="file://$PROJECT_DIR$/src/main/java/GameofLife.java" />
588
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
589
+      <provider selected="true" editor-type-id="text-editor">
590
+        <state relative-caret-position="345">
591
+          <caret line="23" column="0" lean-forward="false" selection-start-line="23" selection-start-column="0" selection-end-line="23" selection-end-column="0" />
592
+          <folding>
593
+            <element signature="imports" expanded="true" />
594
+          </folding>
640 595
         </state>
641 596
       </provider>
642 597
     </entry>
643
-    <entry file="file://$USER_HOME$/Downloads/ConwayLifeRandomat50.png">
598
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/Neighbors.java">
599
+      <provider selected="true" editor-type-id="text-editor">
600
+        <state relative-caret-position="0">
601
+          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="16" selection-end-column="0" />
602
+          <folding>
603
+            <element signature="e#0#523#0" expanded="true" />
604
+          </folding>
605
+        </state>
606
+      </provider>
607
+    </entry>
608
+    <entry file="file://$PROJECT_DIR$/ScreenShot.png">
644 609
       <provider selected="true" editor-type-id="images">
645 610
         <state />
646 611
       </provider>
647 612
     </entry>
648
-    <entry file="file://$USER_HOME$/Documents/gitea/gitea/custom/public/img/ConwayLifeUML.png">
613
+    <entry file="file://$PROJECT_DIR$/ConwayLifeRandomat50.png">
649 614
       <provider selected="true" editor-type-id="images">
650 615
         <state />
651 616
       </provider>
652 617
     </entry>
653
-    <entry file="file://$PROJECT_DIR$/src/main/java/GameofLife.java">
618
+    <entry file="file://$PROJECT_DIR$/ConwayLifeUML.png">
619
+      <provider selected="true" editor-type-id="images">
620
+        <state />
621
+      </provider>
622
+    </entry>
623
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java">
654 624
       <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" />
625
+        <state relative-caret-position="1275">
626
+          <caret line="85" column="0" lean-forward="false" selection-start-line="85" selection-start-column="0" selection-end-line="85" selection-end-column="0" />
657 627
           <folding />
658 628
         </state>
659 629
       </provider>
660 630
     </entry>
661
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java">
662
-      <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" />
665
-          <folding>
666
-            <element signature="imports" expanded="true" />
667
-          </folding>
668
-        </state>
631
+    <entry file="file://$USER_HOME$/Desktop/Screen Shot 2018-03-12 at 6.01.32 PM.png">
632
+      <provider selected="true" editor-type-id="images">
633
+        <state />
669 634
       </provider>
670 635
     </entry>
671
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java">
672
-      <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" />
675
-          <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" />
681
-          </folding>
682
-        </state>
636
+    <entry file="file://$PROJECT_DIR$/Screen Shot 2018-03-12 at 6.01.32 PM.png">
637
+      <provider selected="true" editor-type-id="images">
638
+        <state />
683 639
       </provider>
684 640
     </entry>
685
-    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
641
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java">
686 642
       <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 />
643
+        <state relative-caret-position="561">
644
+          <caret line="45" column="43" lean-forward="false" selection-start-line="45" selection-start-column="43" selection-end-line="45" selection-end-column="43" />
645
+          <folding>
646
+            <element signature="imports" expanded="true" />
647
+          </folding>
690 648
         </state>
691 649
       </provider>
692 650
     </entry>

二進制
Screen Shot 2018-03-12 at 6.01.32 PM.png 查看文件


+ 111
- 7
src/main/java/com/zipcodeconway/ConwayGameOfLife.java 查看文件

@@ -1,11 +1,22 @@
1 1
 package com.zipcodeconway;
2 2
 
3
+import java.lang.reflect.Array;
4
+
3 5
 public class ConwayGameOfLife {
6
+    int[][] currentGen;
7
+    int[][] nextGen;
8
+    private SimpleWindow displayWindow;
4 9
 
5 10
     public ConwayGameOfLife(Integer dimension) {
6
-     }
11
+        this.currentGen = createRandomStart(dimension);
12
+        nextGen = new int[dimension][dimension];
13
+        this.displayWindow = new SimpleWindow(dimension);
14
+    }
7 15
 
8 16
     public ConwayGameOfLife(Integer dimension, int[][] startmatrix) {
17
+        currentGen = startmatrix;
18
+        nextGen = new int[dimension][dimension];
19
+        this.displayWindow = new SimpleWindow(dimension);
9 20
     }
10 21
 
11 22
     public static void main(String[] args) {
@@ -17,18 +28,47 @@ public class ConwayGameOfLife {
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[][] randomStart = new int[dimension][dimension];
32
+        for (int row = 0; row < dimension; row++){
33
+            for (int col = 0; col < dimension; col++){
34
+                randomStart[row][col] = (int) (Math.random() *2);
35
+            }
36
+        }
37
+        return randomStart;
21 38
     }
22 39
 
23 40
     public int[][] simulate(Integer maxGenerations) {
24
-        return new int[1][1];
41
+        int generations = 0;
42
+        while (generations <= maxGenerations ){
43
+            this.displayWindow.display(currentGen, generations);
44
+
45
+            for (int row =0; row < currentGen.length; row++){
46
+                for (int col = 0; col < currentGen.length; col++){
47
+                    nextGen[row][col] = isAlive(row, col, currentGen);
48
+                }
49
+            }
50
+copyAndZeroOut(nextGen, currentGen);
51
+            this.displayWindow.sleep(125);
52
+            generations++;
53
+        }
54
+        return currentGen;
25 55
     }
26 56
 
27 57
     // copy the values of 'next' matrix to 'current' matrix,
28 58
     // and then zero out the contents of 'next' matrix
29
-    public void copyAndZeroOut(int [][] next, int[][] current) {
59
+    public void copyAndZeroOut(int[][] next, int[][] current) {
60
+        for (int row = 0; row < current.length; row++){
61
+            for (int col = 0; col < current.length; col++){
62
+                current[row][col] = next[row][col];
63
+                next[row][col] = 0;
64
+            }
65
+        }
66
+
67
+
68
+
30 69
     }
31 70
 
71
+
32 72
     // Calculate if an individual cell should be alive in the next generation.
33 73
     // Based on the game logic:
34 74
 	/*
@@ -38,6 +78,70 @@ public class ConwayGameOfLife {
38 78
 		Any dead cell with exactly three live neighbours cells will come to life.
39 79
 	*/
40 80
     private int isAlive(int row, int col, int[][] world) {
41
-        return 0;
42
-    }
43
-}
81
+
82
+        int up = row-1;
83
+        int down = row+1;
84
+        int right = col+1;
85
+        int left = col-1;
86
+
87
+        if (up < 0){
88
+            up = world[row].length-1; }
89
+
90
+        if (down == world[row].length){
91
+            down = 0;}
92
+
93
+        if (right == world[col].length){
94
+            right = 0;}
95
+
96
+        if (left < 0){
97
+            left = world[col].length-1;
98
+        }
99
+
100
+
101
+        int neighborCount = 0;
102
+        int value = world[row][col];
103
+//        int[] neighborArray = new int[]{
104
+//                world[up][col],      /*up*/
105
+//                world[down][col],      /*down*/
106
+//                world[row][left],      /*right*/
107
+//                world[row][right],      /*left*/
108
+//                world[up][left],  /*upRight*/
109
+//                world[up][right],  /*upLeft*/
110
+//                world[down][left],  /*downRight*/
111
+//                world[down][right]}; /*downLeft*/
112
+
113
+                    if (world[up][col] > 0){
114
+                        neighborCount++;}
115
+                    if (world[down][col] > 0){
116
+                        neighborCount++;}
117
+                    if (world[row][left] > 0){
118
+                        neighborCount++;}
119
+                    if (world[row][right] > 0){
120
+                        neighborCount++;}
121
+                    if (world[up][left] > 0){
122
+                        neighborCount++;}
123
+                    if (world[up][right] > 0){
124
+                        neighborCount++;}
125
+                    if (world[down][left] > 0){
126
+                        neighborCount++;}
127
+                    if (world[down][right] > 0){
128
+                        neighborCount++;}
129
+
130
+                    if (neighborCount < 2 || neighborCount > 3) {
131
+                        value = 0;
132
+                    }
133
+                    if (value == 0 && neighborCount == 3) {
134
+                        value = 1;
135
+                    }
136
+                    return value;
137
+                }
138
+            }
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+

+ 16
- 0
src/main/java/com/zipcodeconway/Neighbors.java 查看文件

@@ -0,0 +1,16 @@
1
+//package com.zipcodeconway;
2
+//
3
+//public class Neighbors {
4
+//
5
+//
6
+//    public int[] neighborArray = new int[]{
7
+//            world[row + 1][col],      /*up*/
8
+//            world[row - 1][col],      /*down*/
9
+//            world[row][col + 1],      /*right*/
10
+//            world[row][col - 1],      /*left*/
11
+//            world[row + 1][col + 1],  /*upRight*/
12
+//            world[row + 1][col - 1],  /*upLeft*/
13
+//            world[row - 1][col + 1],  /*downRight*/
14
+//            world[row - 1][col - 1]}; /*downLeft*/
15
+//
16
+//}

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

@@ -39,11 +39,11 @@ public class SimpleWindow {
39 39
             for (int j = 0; j < array[0].length; j++) {
40 40
                 g.drawRect(i * BOX_DIM, j * BOX_DIM, 10, 10);
41 41
                 if (array[i][j] == 0) {
42
-                    g.setColor(Color.WHITE);
42
+                    g.setColor(Color.BLUE);
43 43
                     g.fillRect(i * BOX_DIM, j * BOX_DIM, 10, 10);
44 44
                 }
45 45
                 if (array[i][j] == 1) {
46
-                    g.setColor(Color.BLACK);
46
+                    g.setColor(Color.YELLOW);
47 47
                     g.fillRect(i * BOX_DIM, j * BOX_DIM, 10, 10);
48 48
                 }
49 49
             }