Kibret Tecle 6 anni fa
parent
commit
0ff6ac0de8

+ 30
- 30
.idea/workspace.xml Vedi File

3
   <component name="ChangeListManager">
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" />
5
       <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java" afterPath="$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java" />
6
+      <change beforePath="$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java" afterPath="$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java" />
6
     </list>
7
     </list>
7
     <ignored path="$PROJECT_DIR$/target/" />
8
     <ignored path="$PROJECT_DIR$/target/" />
8
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
9
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
18
     </SUITE>
19
     </SUITE>
19
   </component>
20
   </component>
20
   <component name="FileEditorManager">
21
   <component name="FileEditorManager">
21
-    <splitter split-orientation="horizontal" split-proportion="0.63804716">
22
+    <splitter split-orientation="horizontal" split-proportion="0.5682657">
22
       <split-first>
23
       <split-first>
23
         <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
24
         <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
24
           <file leaf-file-name="SimpleWindow.java" pinned="false" current-in-tab="false">
25
           <file leaf-file-name="SimpleWindow.java" pinned="false" current-in-tab="false">
36
           <file leaf-file-name="ConwayGameOfLife.java" pinned="false" current-in-tab="true">
37
           <file leaf-file-name="ConwayGameOfLife.java" pinned="false" current-in-tab="true">
37
             <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java">
38
             <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java">
38
               <provider selected="true" editor-type-id="text-editor">
39
               <provider selected="true" editor-type-id="text-editor">
39
-                <state relative-caret-position="390">
40
-                  <caret line="26" column="45" lean-forward="true" selection-start-line="26" selection-start-column="45" selection-end-line="26" selection-end-column="45" />
40
+                <state relative-caret-position="1470">
41
+                  <caret line="98" column="33" lean-forward="false" selection-start-line="98" selection-start-column="15" selection-end-line="98" selection-end-column="33" />
41
                   <folding />
42
                   <folding />
42
                 </state>
43
                 </state>
43
               </provider>
44
               </provider>
57
           <file leaf-file-name="ConwayGameOfLifeTest.java" pinned="false" current-in-tab="true">
58
           <file leaf-file-name="ConwayGameOfLifeTest.java" pinned="false" current-in-tab="true">
58
             <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
59
             <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
59
               <provider selected="true" editor-type-id="text-editor">
60
               <provider selected="true" editor-type-id="text-editor">
60
-                <state relative-caret-position="855">
61
-                  <caret line="60" column="0" lean-forward="false" selection-start-line="60" selection-start-column="0" selection-end-line="60" selection-end-column="0" />
61
+                <state relative-caret-position="615">
62
+                  <caret line="44" column="55" lean-forward="false" selection-start-line="44" selection-start-column="55" selection-end-line="44" selection-end-column="55" />
62
                   <folding />
63
                   <folding />
63
                 </state>
64
                 </state>
64
               </provider>
65
               </provider>
107
         <option value="$PROJECT_DIR$/src/main/java/Life.java" />
108
         <option value="$PROJECT_DIR$/src/main/java/Life.java" />
108
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java" />
109
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/SimpleWindow.java" />
109
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/README.md" />
110
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/README.md" />
110
-        <option value="$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java" />
111
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java" />
111
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java" />
112
+        <option value="$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java" />
112
       </list>
113
       </list>
113
     </option>
114
     </option>
114
   </component>
115
   </component>
356
       <envs />
357
       <envs />
357
       <patterns />
358
       <patterns />
358
     </configuration>
359
     </configuration>
359
-    <configuration name="ConwayGameOfLifeTest.testIsAlive2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
360
+    <configuration name="ConwayGameOfLifeTest.testNumberOfLiveGetNeignbours" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
360
       <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
361
       <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
361
         <pattern>
362
         <pattern>
362
           <option name="PATTERN" value="com.zipcodeconway.*" />
363
           <option name="PATTERN" value="com.zipcodeconway.*" />
368
       <option name="ALTERNATIVE_JRE_PATH" />
369
       <option name="ALTERNATIVE_JRE_PATH" />
369
       <option name="PACKAGE_NAME" value="com.zipcodeconway" />
370
       <option name="PACKAGE_NAME" value="com.zipcodeconway" />
370
       <option name="MAIN_CLASS_NAME" value="com.zipcodeconway.ConwayGameOfLifeTest" />
371
       <option name="MAIN_CLASS_NAME" value="com.zipcodeconway.ConwayGameOfLifeTest" />
371
-      <option name="METHOD_NAME" value="testIsAlive2" />
372
+      <option name="METHOD_NAME" value="testNumberOfLiveGetNeignbours" />
372
       <option name="TEST_OBJECT" value="method" />
373
       <option name="TEST_OBJECT" value="method" />
373
       <option name="VM_PARAMETERS" value="-ea" />
374
       <option name="VM_PARAMETERS" value="-ea" />
374
       <option name="PARAMETERS" />
375
       <option name="PARAMETERS" />
464
     </configuration>
465
     </configuration>
465
     <list size="6">
466
     <list size="6">
466
       <item index="0" class="java.lang.String" itemvalue="Maven.ConwayLife" />
467
       <item index="0" class="java.lang.String" itemvalue="Maven.ConwayLife" />
467
-      <item index="1" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.testIsAlive2" />
468
-      <item index="2" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest" />
469
-      <item index="3" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest3" />
470
-      <item index="4" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest1" />
471
-      <item index="5" class="java.lang.String" itemvalue="Application.ConwayGameOfLife" />
468
+      <item index="1" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest" />
469
+      <item index="2" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest3" />
470
+      <item index="3" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest1" />
471
+      <item index="4" class="java.lang.String" itemvalue="Application.ConwayGameOfLife" />
472
+      <item index="5" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.testNumberOfLiveGetNeignbours" />
472
     </list>
473
     </list>
473
     <recent_temporary>
474
     <recent_temporary>
474
       <list size="5">
475
       <list size="5">
475
         <item index="0" class="java.lang.String" itemvalue="Application.ConwayGameOfLife" />
476
         <item index="0" class="java.lang.String" itemvalue="Application.ConwayGameOfLife" />
476
         <item index="1" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest" />
477
         <item index="1" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest" />
477
-        <item index="2" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest3" />
478
-        <item index="3" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest1" />
479
-        <item index="4" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.testIsAlive2" />
478
+        <item index="2" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.testNumberOfLiveGetNeignbours" />
479
+        <item index="3" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest3" />
480
+        <item index="4" class="java.lang.String" itemvalue="JUnit.ConwayGameOfLifeTest.runTest1" />
480
       </list>
481
       </list>
481
     </recent_temporary>
482
     </recent_temporary>
482
   </component>
483
   </component>
494
       <option name="presentableId" value="Default" />
495
       <option name="presentableId" value="Default" />
495
       <updated>1519668901598</updated>
496
       <updated>1519668901598</updated>
496
       <workItem from="1519668902904" duration="14517000" />
497
       <workItem from="1519668902904" duration="14517000" />
497
-      <workItem from="1520801916382" duration="36937000" />
498
+      <workItem from="1520801916382" duration="37411000" />
498
     </task>
499
     </task>
499
     <servers />
500
     <servers />
500
   </component>
501
   </component>
520
     <history-entry file="ConwayGameOfLifeTest - 2018.03.12 at 21h 32m 48s.xml">
521
     <history-entry file="ConwayGameOfLifeTest - 2018.03.12 at 21h 32m 48s.xml">
521
       <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
522
       <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
522
     </history-entry>
523
     </history-entry>
523
-    <history-entry file="ConwayGameOfLifeTest_runTest1 - 2018.03.12 at 19h 39m 46s.xml">
524
-      <configuration name="ConwayGameOfLifeTest.runTest1" configurationId="JUnit" />
524
+    <history-entry file="ConwayGameOfLifeTest - 2018.03.12 at 21h 46m 01s.xml">
525
+      <configuration name="ConwayGameOfLifeTest" configurationId="JUnit" />
525
     </history-entry>
526
     </history-entry>
526
     <history-entry file="ConwayGameOfLifeTest_runTest3 - 2018.03.12 at 19h 42m 29s.xml">
527
     <history-entry file="ConwayGameOfLifeTest_runTest3 - 2018.03.12 at 19h 42m 29s.xml">
527
       <configuration name="ConwayGameOfLifeTest.runTest3" configurationId="JUnit" />
528
       <configuration name="ConwayGameOfLifeTest.runTest3" configurationId="JUnit" />
531
     </history-entry>
532
     </history-entry>
532
   </component>
533
   </component>
533
   <component name="TimeTrackingManager">
534
   <component name="TimeTrackingManager">
534
-    <option name="totallyTimeSpent" value="51454000" />
535
+    <option name="totallyTimeSpent" value="51928000" />
535
   </component>
536
   </component>
536
   <component name="ToolWindowManager">
537
   <component name="ToolWindowManager">
537
     <frame x="-213" y="-1080" width="1920" height="1080" extended-state="0" />
538
     <frame x="-213" y="-1080" width="1920" height="1080" extended-state="0" />
538
-    <editor active="true" />
539
     <layout>
539
     <layout>
540
       <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" />
540
       <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" />
541
       <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" />
541
       <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" />
542
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32718447" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
542
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.326713" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
543
       <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" />
543
       <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" />
544
       <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" />
544
       <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" />
545
       <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" />
545
       <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" />
546
       <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" />
546
       <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" />
547
       <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" />
547
       <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" />
548
-      <window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2747573" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
548
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2747573" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
549
       <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" />
549
       <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" />
550
       <window_info id="Coverage" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3297568" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
550
       <window_info id="Coverage" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3297568" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
551
-      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.22746186" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
551
+      <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.22718446" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
552
       <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" />
552
       <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" />
553
       <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" />
553
       <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" />
554
       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.13125" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
554
       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.13125" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
664
         </state>
664
         </state>
665
       </provider>
665
       </provider>
666
     </entry>
666
     </entry>
667
-    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
667
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java">
668
       <provider selected="true" editor-type-id="text-editor">
668
       <provider selected="true" editor-type-id="text-editor">
669
-        <state relative-caret-position="855">
670
-          <caret line="60" column="0" lean-forward="false" selection-start-line="60" selection-start-column="0" selection-end-line="60" selection-end-column="0" />
669
+        <state relative-caret-position="1470">
670
+          <caret line="98" column="33" lean-forward="false" selection-start-line="98" selection-start-column="15" selection-end-line="98" selection-end-column="33" />
671
           <folding />
671
           <folding />
672
         </state>
672
         </state>
673
       </provider>
673
       </provider>
674
     </entry>
674
     </entry>
675
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodeconway/ConwayGameOfLife.java">
675
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java">
676
       <provider selected="true" editor-type-id="text-editor">
676
       <provider selected="true" editor-type-id="text-editor">
677
-        <state relative-caret-position="390">
678
-          <caret line="26" column="45" lean-forward="true" selection-start-line="26" selection-start-column="45" selection-end-line="26" selection-end-column="45" />
677
+        <state relative-caret-position="615">
678
+          <caret line="44" column="55" lean-forward="false" selection-start-line="44" selection-start-column="55" selection-end-line="44" selection-end-column="55" />
679
           <folding />
679
           <folding />
680
         </state>
680
         </state>
681
       </provider>
681
       </provider>

+ 2
- 2
src/main/java/com/zipcodeconway/ConwayGameOfLife.java Vedi File

85
 		Any dead cell with exactly three live neighbours cells will come to life.
85
 		Any dead cell with exactly three live neighbours cells will come to life.
86
 	*/
86
 	*/
87
     public int isAlive(int row, int col, int[][] world) {
87
     public int isAlive(int row, int col, int[][] world) {
88
-        int neighbours = getNeighbours(row, col, world);
88
+        int neighbours = getNeighboursALive(row, col, world);
89
 
89
 
90
         //test
90
         //test
91
         if (neighbours == 2)
91
         if (neighbours == 2)
96
             return 0;
96
             return 0;
97
     }
97
     }
98
 
98
 
99
-    public int getNeighbours(int row, int col, int[][] input) {
99
+    public int getNeighboursALive(int row, int col, int[][] input) {
100
         int totalNeighbors = 0;
100
         int totalNeighbors = 0;
101
         int index = 0;
101
         int index = 0;
102
         for (int i = -1; i <= 1; i++) {
102
         for (int i = -1; i <= 1; i++) {

+ 5
- 5
src/test/java/com/zipcodeconway/ConwayGameOfLifeTest.java Vedi File

21
     }
21
     }
22
     @Test
22
     @Test
23
     public void testIsAlive2(){
23
     public void testIsAlive2(){
24
-        ConwayGameOfLife x=new ConwayGameOfLife(5);
24
+        ConwayGameOfLife test=new ConwayGameOfLife(5);
25
         int[][] start = {
25
         int[][] start = {
26
                 {0, 0, 0, 0, 0},
26
                 {0, 0, 0, 0, 0},
27
                 {0, 0, 1, 0, 0},
27
                 {0, 0, 1, 0, 0},
29
                 {0, 0, 1, 0, 0},
29
                 {0, 0, 1, 0, 0},
30
                 {0, 0, 0, 0, 0}};
30
                 {0, 0, 0, 0, 0}};
31
         int expected =1;
31
         int expected =1;
32
-        int actual = x.isAlive(2,2,start);
32
+        int actual = test.isAlive(2,2,start);
33
         Assert.assertEquals(expected,actual);
33
         Assert.assertEquals(expected,actual);
34
     }
34
     }
35
     @Test
35
     @Test
36
     public void testNumberOfLiveGetNeignbours(){
36
     public void testNumberOfLiveGetNeignbours(){
37
-        ConwayGameOfLife x=new ConwayGameOfLife(5);
37
+        ConwayGameOfLife test=new ConwayGameOfLife(5);
38
         int[][] start = {
38
         int[][] start = {
39
                 {0, 0, 0, 0, 0},
39
                 {0, 0, 0, 0, 0},
40
                 {0, 0, 1, 0, 0},
40
                 {0, 0, 1, 0, 0},
42
                 {0, 0, 1, 0, 0},
42
                 {0, 0, 1, 0, 0},
43
                 {0, 0, 0, 0, 0}};
43
                 {0, 0, 0, 0, 0}};
44
         int expected =2;
44
         int expected =2;
45
-        //int actual = x.getneighbours(x.getNeighbours(3,3,start));
46
-        //Assert.assertEquals(expected,actual);
45
+        int actual = test.getNeighboursALive(3,3,start);
46
+        Assert.assertEquals(expected,actual);
47
     }
47
     }
48
     @Test
48
     @Test
49
     public void testGetNeignbours(){
49
     public void testGetNeignbours(){