diff --git a/.besouro/201510121641484/actions.txt b/.besouro/201510121641484/actions.txt
new file mode 100644
index 0000000..6168e84
--- /dev/null
+++ b/.besouro/201510121641484/actions.txt
@@ -0,0 +1,52 @@
+FileOpenedAction 1444657308681 Cell.java 964 8 19 0
+UnitTestCaseAction 1444657320274 TestCell.java OK
+UnitTestSessionAction 1444657320283 TestCell (1) OK
+UnitTestCaseAction 1444657330308 TestGrid.java OK
+UnitTestSessionAction 1444657330318 TestGrid (1) OK
+RefactoringAction 1444657564253 Cell.java RENAME Cell(int, int)=>Cell() METHOD
+RefactoringAction 1444657569789 Cell.java RENAME Cell(String)=>Cell(String, int, int) METHOD
+RefactoringAction 1444657573311 Cell.java REMOVE Cell() METHOD
+EditAction 1444657578747 Cell.java 943 7 19 0
+CompilationAction 1444657579755 Grid.java
+CompilationAction 1444657579755 TestCell.java
+CompilationAction 1444657579756 TestGrid.java
+CompilationAction 1444657775271 TestGrid.java
+CompilationAction 1444657778407 TestCell.java
+CompilationAction 1444657848514 Grid.java
+EditAction 1444658048231 Grid.java 642 2 6 0
+UnitTestCaseAction 1444658050641 TestGrid.java OK
+UnitTestSessionAction 1444658050642 TestGrid (1) OK
+RefactoringAction 1444659193694 Cell.java REMOVE hashCode() METHOD
+RefactoringAction 1444659193694 Cell.java REMOVE equals(Object) METHOD
+RefactoringAction 1444659211232 Cell.java ADD int hashCode() METHOD
+RefactoringAction 1444659211236 Cell.java ADD boolean equals(Object) METHOD
+FileOpenedAction 1444659368777 TestCell.java 1051 5 10 4
+RefactoringAction 1444659396621 TestCell.java ADD import org.junit.Before IMPORT
+RefactoringAction 1444659441280 TestCell.java ADD Cell aliveCell FIELD
+RefactoringAction 1444659441280 TestCell.java ADD Cell deadCell FIELD
+EditAction 1444659506041 Cell.java 1142 7 21 0
+EditAction 1444659509408 TestCell.java 724 3 6 2
+UnitTestCaseAction 1444659515594 TestGrid.java OK
+UnitTestSessionAction 1444659515595 TestGrid (1) OK
+RefactoringAction 1444659541184 TestCell.java ADD void testCellUpdateAliveCellWithFourNeighborsShouldDie() METHOD
+EditAction 1444659553737 TestCell.java 891 4 8 3
+UnitTestCaseAction 1444659554774 TestCell.java FAIL
+UnitTestSessionAction 1444659554774 TestCell (1) FAIL
+FileOpenedAction 1444659564419 Cell.java 555 4 4 0
+EditAction 1444659767369 Cell.java 1210 7 21 0
+UnitTestCaseAction 1444659768509 TestCell.java OK
+UnitTestSessionAction 1444659768510 TestCell (1) OK
+RefactoringAction 1444659796168 TestCell.java ADD void testCellUpdateDeadCellWithThreeNeighborsShouldLive() METHOD
+EditAction 1444659806895 TestCell.java 1060 5 10 4
+UnitTestCaseAction 1444659808094 TestCell.java OK
+UnitTestSessionAction 1444659808094 TestCell (1) OK
+RefactoringAction 1444660379096 TestGrid.java ADD void testTwoNeighborCellsShouldHaveOneNeigbor()/2 METHOD
+RefactoringAction 1444660394614 TestGrid.java REMOVE testTwoNeighborCellsShouldHaveOneNeigbor()/2 METHOD
+EditAction 1444660426503 TestGrid.java 1146 3 19 3
+EditAction 1444660474136 Grid.java 675 2 7 0
+UnitTestCaseAction 1444660476755 TestCell.java OK
+UnitTestSessionAction 1444660476755 TestCell (1) OK
+UnitTestCaseAction 1444660516873 TestGrid.java OK
+UnitTestSessionAction 1444660516874 TestGrid (1) OK
+EditAction 1444660534114 Grid.java 642 2 6 0
+FileOpenedAction 1444661271189 GameOfLife.java 74 0 0 0
diff --git a/.besouro/201510121641484/besouroEpisodes.txt b/.besouro/201510121641484/besouroEpisodes.txt
new file mode 100644
index 0000000..93b3933
--- /dev/null
+++ b/.besouro/201510121641484/besouroEpisodes.txt
@@ -0,0 +1,3 @@
+1444657320283 regression 1 11 true
+1444657330318 regression 1 0 true
+1444658050642 refactoring 2A 486 true
diff --git a/.besouro/201510121641484/disagreements.txt b/.besouro/201510121641484/disagreements.txt
new file mode 100644
index 0000000..e69de29
diff --git a/.besouro/201510121641484/randomHeuristicEpisodes.txt b/.besouro/201510121641484/randomHeuristicEpisodes.txt
new file mode 100644
index 0000000..5668f47
--- /dev/null
+++ b/.besouro/201510121641484/randomHeuristicEpisodes.txt
@@ -0,0 +1,3 @@
+1444657320283 regression 1 11 false
+1444657330318 regression 1 0 true
+1444658050642 refactoring 2A 486 true
diff --git a/.besouro/201510121641484/userComments.txt b/.besouro/201510121641484/userComments.txt
new file mode 100644
index 0000000..e69de29
diff --git a/.besouro/201510121641484/zorroEpisodes.txt b/.besouro/201510121641484/zorroEpisodes.txt
new file mode 100644
index 0000000..a078e21
--- /dev/null
+++ b/.besouro/201510121641484/zorroEpisodes.txt
@@ -0,0 +1,3 @@
+1444657320283 regression 1 11 false
+1444657330318 regression 1 10 false
+1444658050642 refactoring 2A 720 false
diff --git a/.besouro/20151012211902907/actions.txt b/.besouro/20151012211902907/actions.txt
new file mode 100644
index 0000000..34f08b8
--- /dev/null
+++ b/.besouro/20151012211902907/actions.txt
@@ -0,0 +1,72 @@
+FileOpenedAction 1444673943419 GameOfLife.java 76 0 0 0
+FileOpenedAction 1444673947507 TestGrid.java 1146 3 19 3
+FileOpenedAction 1444673949305 TestCell.java 1060 5 10 4
+RefactoringAction 1444673986379 GameOfLifeTest.java ADD void test() METHOD
+RefactoringAction 1444673986391 GameOfLifeTest.java ADD import org.junit.Assert.* IMPORT
+RefactoringAction 1444673986410 GameOfLifeTest.java ADD GameOfLifeTest.java CLASS
+FileOpenedAction 1444673986664 GameOfLifeTest.java 215 1 1 0
+RefactoringAction 1444674001990 GameOfLifeTest.java REMOVE GameOfLifeTest.java CLASS
+RefactoringAction 1444674234411 GameOfLifeTest.java RENAME test()=>void testG() METHOD
+RefactoringAction 1444674238427 GameOfLifeTest.java RENAME testG()=>void test() METHOD
+RefactoringAction 1444674243460 GameOfLifeTest.java RENAME test()=>void testFill() METHOD
+RefactoringAction 1444674248003 GameOfLifeTest.java RENAME testFill()=>void testFillHashMap() METHOD
+RefactoringAction 1444674268529 GameOfLifeTest.java RENAME testFillHashMap()=>void testFillHashSet() METHOD
+RefactoringAction 1444674301038 GameOfLifeTest.java RENAME testFillHashSet()=>void testFillHashSetR() METHOD
+RefactoringAction 1444674302545 GameOfLifeTest.java RENAME testFillHashSetR()=>void testFillHashSetRe() METHOD
+RefactoringAction 1444674304055 GameOfLifeTest.java RENAME testFillHashSetRe()=>void testFillHashSet() METHOD
+RefactoringAction 1444674306068 GameOfLifeTest.java RENAME testFillHashSet()=>void testFillHashS() METHOD
+RefactoringAction 1444674308076 GameOfLifeTest.java RENAME testFillHashS()=>void testFillHash() METHOD
+RefactoringAction 1444674312586 GameOfLifeTest.java RENAME testFillHash()=>void testFillHashRe() METHOD
+RefactoringAction 1444674314098 GameOfLifeTest.java RENAME testFillHashRe()=>void testFillHashReturn() METHOD
+RefactoringAction 1444674316105 GameOfLifeTest.java RENAME testFillHashReturn()=>void testFillHashReturnFalse() METHOD
+RefactoringAction 1444674339130 GameOfLifeTest.java RENAME testFillHashReturnFalse()=>void testFillHashR() METHOD
+RefactoringAction 1444674349515 GameOfLifeTest.java REMOVE GameOfLifeTest.java CLASS
+RefactoringAction 1444674368704 TestGrid.java ADD void test FIELD
+RefactoringAction 1444674371216 TestGrid.java RENAME test=>void testFillHash FIELD
+RefactoringAction 1444674372739 TestGrid.java RENAME testFillHash=>void testFillHashSet FIELD
+RefactoringAction 1444674400482 TestGrid.java RENAME testFillHashSet=>void testFillHashSetWith FIELD
+RefactoringAction 1444674406533 TestGrid.java RENAME testFillHashSetWith=>void testFillHashSetWithIsEmpty FIELD
+RefactoringAction 1444674413549 TestGrid.java RENAME testFillHashSetWithIsEmpty=>void testFillHashSetWithIsEmpty_ReturnFalse() METHOD
+RefactoringAction 1444674636562 TestGrid.java RENAME testFillHashSetWithIsEmpty_ReturnFalse()=>void testFillGridWithIsEmpty_ReturnFalse() METHOD
+RefactoringAction 1444675117181 TestGrid.java ADD import java.util.HashSe IMPORT
+RefactoringAction 1444675121197 TestGrid.java RENAME import java.util.HashSe=>import java.util.HashSeT IMPORT
+RefactoringAction 1444675124739 TestGrid.java RENAME import java.util.HashSeT=>import java.util.HashSet IMPORT
+RefactoringAction 1444675138927 TestGrid.java REMOVE import java.util.HashSet IMPORT
+EditAction 1444675140938 TestGrid.java 1337 4 23 4
+CompilationAction 1444675141570 TestGrid.java
+CompilationAction 1444675141570 TestGrid.java
+FileOpenedAction 1444675185588 SudokuVerifier.java 5508 13 48 0
+RefactoringAction 1444675329063 TestGrid.java ADD import java IMPORT
+RefactoringAction 1444675330580 TestGrid.java RENAME import java=>import java.u IMPORT
+RefactoringAction 1444675337091 TestGrid.java RENAME import java.u=>import java.util IMPORT
+RefactoringAction 1444675338600 TestGrid.java REMOVE import java.util IMPORT
+RefactoringAction 1444675340609 TestGrid.java ADD import java.util.h IMPORT
+RefactoringAction 1444675342117 TestGrid.java REMOVE import java.util.h IMPORT
+RefactoringAction 1444675353151 TestGrid.java ADD import java.util.h IMPORT
+RefactoringAction 1444675356670 TestGrid.java RENAME import java.util.h=>import java.util.HashSet IMPORT
+CompilationAction 1444675381343 TestGrid.java
+CompilationAction 1444675381343 TestGrid.java
+RefactoringAction 1444675613145 TestGrid.java ADD import java.util.HashSet/2 IMPORT
+RefactoringAction 1444675614655 TestGrid.java RENAME import java.util.HashSet/2=>import java.util.HashSet.is IMPORT
+RefactoringAction 1444675616164 TestGrid.java RENAME import java.util.HashSet.is=>import java.util.HashSet.isEmp IMPORT
+RefactoringAction 1444675617179 TestGrid.java RENAME import java.util.HashSet.isEmp=>import java.util.HashSet.isEmpty IMPORT
+RefactoringAction 1444675687751 TestGrid.java REMOVE import java.util.HashSet.isEmpty IMPORT
+RefactoringAction 1444675689770 TestGrid.java ADD import java.util.HashSet.isEmpty IMPORT
+RefactoringAction 1444675698298 TestGrid.java REMOVE import java.util.HashSet.isEmpty IMPORT
+RefactoringAction 1444675711826 TestGrid.java ADD import java.util.Set IMPORT
+RefactoringAction 1444675720846 TestGrid.java RENAME import java.util.Set=>import java.util.HashSet.isEmpty IMPORT
+RefactoringAction 1444675722356 TestGrid.java REMOVE import java.util.HashSet.isEmpty IMPORT
+RefactoringAction 1444675783832 TestGrid.java ADD import java.util.Set IMPORT
+RefactoringAction 1444675892501 TestGrid.java ADD import java.util.Arrays IMPORT
+CompilationAction 1444675894513 TestGrid.java
+CompilationAction 1444675894514 TestGrid.java
+RefactoringAction 1444675901548 TestGrid.java REMOVE import java.util.Arrays IMPORT
+CompilationAction 1444675902101 TestGrid.java
+CompilationAction 1444675902101 TestGrid.java
+CompilationAction 1444675902266 TestGrid.java
+CompilationAction 1444675902267 TestGrid.java
+RefactoringAction 1444675962525 GameOfLifeTest.java ADD GameOfLifeTest.java CLASS
+EditAction 1444676002571 TestGrid.java 1385 4 23 4
+EditAction 1444676348246 TestGrid.java 1388 4 23 4
+EditAction 1444676427581 TestGrid.java 1394 4 23 4
+EditAction 1444676487639 Grid.java 642 2 6 0
diff --git a/.besouro/20151012211902907/besouroEpisodes.txt b/.besouro/20151012211902907/besouroEpisodes.txt
new file mode 100644
index 0000000..e69de29
diff --git a/.besouro/20151012211902907/disagreements.txt b/.besouro/20151012211902907/disagreements.txt
new file mode 100644
index 0000000..e69de29
diff --git a/.besouro/20151012211902907/randomHeuristicEpisodes.txt b/.besouro/20151012211902907/randomHeuristicEpisodes.txt
new file mode 100644
index 0000000..e69de29
diff --git a/.besouro/20151012211902907/userComments.txt b/.besouro/20151012211902907/userComments.txt
new file mode 100644
index 0000000..e69de29
diff --git a/.besouro/20151012211902907/zorroEpisodes.txt b/.besouro/20151012211902907/zorroEpisodes.txt
new file mode 100644
index 0000000..e69de29
diff --git a/.besouro/20151013011235415/actions.txt b/.besouro/20151013011235415/actions.txt
new file mode 100644
index 0000000..fa79615
--- /dev/null
+++ b/.besouro/20151013011235415/actions.txt
@@ -0,0 +1,36 @@
+FileOpenedAction 1444687955903 GameOfLife.java 539 2 3 0
+UnitTestCaseAction 1444687959975 TestGrid.java OK
+UnitTestSessionAction 1444687959977 TestGrid (1) OK
+UnitTestCaseAction 1444687964909 TestGrid.java OK
+UnitTestSessionAction 1444687964909 TestGrid (1) OK
+UnitTestCaseAction 1444687971664 TestGrid.java FAIL
+UnitTestSessionAction 1444687971665 TestGrid (1) FAIL
+UnitTestCaseAction 1444687978271 TestGrid.java OK
+UnitTestSessionAction 1444687978272 TestGrid (1) OK
+UnitTestCaseAction 1444687979687 TestGrid.java OK
+UnitTestSessionAction 1444687979688 TestGrid (1) OK
+UnitTestCaseAction 1444687981433 TestGrid.java FAIL
+UnitTestSessionAction 1444687981433 TestGrid (1) FAIL
+UnitTestCaseAction 1444688003776 GameOfLifeTest.java OK
+UnitTestSessionAction 1444688003777 GameOfLifeTest OK
+UnitTestCaseAction 1444688007854 TestCell.java OK
+UnitTestSessionAction 1444688007854 TestCell (1) OK
+UnitTestCaseAction 1444688010936 TestCell.java OK
+UnitTestSessionAction 1444688010937 TestCell (1) OK
+UnitTestCaseAction 1444688012185 TestCell.java OK
+UnitTestSessionAction 1444688012186 TestCell (1) OK
+UnitTestCaseAction 1444688015477 GameOfLifeTest.java OK
+UnitTestSessionAction 1444688015478 GameOfLifeTest OK
+UnitTestCaseAction 1444688016783 GameOfLifeTest.java OK
+UnitTestSessionAction 1444688016784 GameOfLifeTest OK
+UnitTestCaseAction 1444688048230 TestGrid.java FAIL
+UnitTestSessionAction 1444688048231 TestGrid (1) FAIL
+EditAction 1444688501950 Grid.java 1843 7 20 0
+UnitTestCaseAction 1444688504947 TestGrid.java FAIL
+UnitTestSessionAction 1444688504947 TestGrid (1) FAIL
+UnitTestCaseAction 1444688510065 TestGrid.java OK
+UnitTestSessionAction 1444688510066 TestGrid (1) OK
+UnitTestCaseAction 1444688512601 TestGrid.java FAIL
+UnitTestSessionAction 1444688512602 TestGrid (1) FAIL
+UnitTestCaseAction 1444688514356 TestGrid.java FAIL
+UnitTestSessionAction 1444688514357 TestGrid (1) FAIL
diff --git a/.besouro/20151013011235415/besouroEpisodes.txt b/.besouro/20151013011235415/besouroEpisodes.txt
new file mode 100644
index 0000000..3fdd247
--- /dev/null
+++ b/.besouro/20151013011235415/besouroEpisodes.txt
@@ -0,0 +1,11 @@
+1444687959977 regression 1 4 true
+1444687964909 regression 1 0 true
+1444687978272 regression 2 6 true
+1444687979688 regression 1 0 true
+1444688003777 regression 2 22 true
+1444688007854 regression 1 0 true
+1444688010937 regression 1 0 true
+1444688012186 regression 1 0 true
+1444688015478 regression 1 0 true
+1444688016784 regression 1 0 true
+1444688510066 regression 2 461 true
diff --git a/.besouro/20151013011235415/disagreements.txt b/.besouro/20151013011235415/disagreements.txt
new file mode 100644
index 0000000..e69de29
diff --git a/.besouro/20151013011235415/randomHeuristicEpisodes.txt b/.besouro/20151013011235415/randomHeuristicEpisodes.txt
new file mode 100644
index 0000000..08b2dce
--- /dev/null
+++ b/.besouro/20151013011235415/randomHeuristicEpisodes.txt
@@ -0,0 +1,11 @@
+1444687959977 regression 1 4 true
+1444687964909 regression 1 0 false
+1444687978272 regression 2 6 true
+1444687979688 regression 1 0 false
+1444688003777 regression 2 22 false
+1444688007854 regression 1 0 false
+1444688010937 regression 1 0 true
+1444688012186 regression 1 0 true
+1444688015478 regression 1 0 true
+1444688016784 regression 1 0 true
+1444688510066 regression 2 461 false
diff --git a/.besouro/20151013011235415/userComments.txt b/.besouro/20151013011235415/userComments.txt
new file mode 100644
index 0000000..e69de29
diff --git a/.besouro/20151013011235415/zorroEpisodes.txt b/.besouro/20151013011235415/zorroEpisodes.txt
new file mode 100644
index 0000000..ec75670
--- /dev/null
+++ b/.besouro/20151013011235415/zorroEpisodes.txt
@@ -0,0 +1,11 @@
+1444687959977 regression 1 4 false
+1444687964909 regression 1 4 false
+1444687978272 regression 2 13 false
+1444687979688 regression 1 1 false
+1444688003777 regression 2 24 false
+1444688007854 regression 1 4 false
+1444688010937 regression 1 3 false
+1444688012186 regression 1 1 false
+1444688015478 regression 1 3 false
+1444688016784 regression 1 1 false
+1444688510066 regression 2 493 false
diff --git a/.besouro/2015101310222917/actions.txt b/.besouro/2015101310222917/actions.txt
new file mode 100644
index 0000000..e2c814c
--- /dev/null
+++ b/.besouro/2015101310222917/actions.txt
@@ -0,0 +1,248 @@
+FileOpenedAction 1444720949477 TestCell.java 1060 5 10 4
+FileOpenedAction 1444720957268 GameOfLife.java 539 2 3 0
+FileOpenedAction 1444720977614 Grid.java 1843 7 20 0
+EditAction 1444721157634 Grid.java 1951 7 23 0
+UnitTestCaseAction 1444721164627 TestGrid.java OK
+UnitTestSessionAction 1444721164635 TestGrid (1) OK
+UnitTestCaseAction 1444721169299 TestGrid.java OK
+UnitTestSessionAction 1444721169300 TestGrid (1) OK
+UnitTestCaseAction 1444721170700 TestGrid.java OK
+UnitTestSessionAction 1444721170701 TestGrid (1) OK
+UnitTestCaseAction 1444721171809 TestGrid.java OK
+UnitTestSessionAction 1444721171810 TestGrid (1) OK
+UnitTestCaseAction 1444721179116 TestGrid.java OK
+UnitTestSessionAction 1444721179117 TestGrid (1) OK
+UnitTestCaseAction 1444721180632 TestGrid.java FAIL
+UnitTestSessionAction 1444721180632 TestGrid (1) FAIL
+RefactoringAction 1444721210301 Grid.java ADD int tries FIELD
+EditAction 1444721214559 Grid.java 1949 7 22 0
+UnitTestCaseAction 1444721217076 TestGrid.java FAIL
+UnitTestSessionAction 1444721217077 TestGrid (1) FAIL
+UnitTestCaseAction 1444721221372 TestGrid.java OK
+UnitTestSessionAction 1444721221373 TestGrid (1) OK
+UnitTestCaseAction 1444721224009 TestGrid.java OK
+UnitTestSessionAction 1444721224010 TestGrid (1) OK
+UnitTestCaseAction 1444721225463 TestGrid.java FAIL
+UnitTestSessionAction 1444721225464 TestGrid (1) FAIL
+EditAction 1444721255273 Grid.java 1951 7 22 0
+UnitTestCaseAction 1444721262594 TestGrid.java FAIL
+UnitTestSessionAction 1444721262595 TestGrid (1) FAIL
+EditAction 1444721290982 Grid.java 1980 7 23 0
+UnitTestCaseAction 1444721293596 TestGrid.java FAIL
+UnitTestSessionAction 1444721293596 TestGrid (1) FAIL
+EditAction 1444721357142 Grid.java 1989 7 22 0
+UnitTestCaseAction 1444721361609 TestGrid.java OK
+UnitTestSessionAction 1444721361609 TestGrid (1) OK
+UnitTestCaseAction 1444721369690 TestGrid.java OK
+UnitTestSessionAction 1444721369690 TestGrid (1) OK
+UnitTestCaseAction 1444721376568 TestGrid.java OK
+UnitTestSessionAction 1444721376569 TestGrid (1) OK
+UnitTestCaseAction 1444721378966 TestGrid.java FAIL
+UnitTestSessionAction 1444721378966 TestGrid (1) FAIL
+UnitTestCaseAction 1444721409093 TestGrid.java FAIL
+UnitTestSessionAction 1444721409094 TestGrid (1) FAIL
+UnitTestCaseAction 1444721411131 TestGrid.java OK
+UnitTestSessionAction 1444721411132 TestGrid (1) OK
+UnitTestCaseAction 1444721412843 TestGrid.java FAIL
+UnitTestSessionAction 1444721412843 TestGrid (1) FAIL
+RefactoringAction 1444721456140 Grid.java RENAME tries=>int triesto FIELD
+RefactoringAction 1444721459162 Grid.java RENAME triesto=>int triesToGet FIELD
+RefactoringAction 1444721462187 Grid.java RENAME triesToGet=>int triesToGetBalanced FIELD
+RefactoringAction 1444721465206 Grid.java RENAME triesToGetBalanced=>int triesToGetBalancedGrid FIELD
+RefactoringAction 1444721470228 Grid.java RENAME triesToGetBalancedGrid=>int triesToGetBalancedInitialGrid FIELD
+EditAction 1444721488582 Grid.java 2109 7 22 0
+UnitTestCaseAction 1444721491923 TestGrid.java OK
+UnitTestSessionAction 1444721491923 TestGrid (1) OK
+EditAction 1444721500745 Grid.java 2059 7 21 0
+UnitTestCaseAction 1444721503168 TestGrid.java OK
+UnitTestSessionAction 1444721503168 TestGrid (1) OK
+UnitTestCaseAction 1444721504511 TestGrid.java OK
+UnitTestSessionAction 1444721504512 TestGrid (1) OK
+UnitTestCaseAction 1444721505631 TestGrid.java FAIL
+UnitTestSessionAction 1444721505631 TestGrid (1) FAIL
+EditAction 1444721573792 Grid.java 2091 7 22 0
+UnitTestCaseAction 1444721577207 TestGrid.java OK
+UnitTestSessionAction 1444721577207 TestGrid (1) OK
+UnitTestCaseAction 1444721581617 TestGrid.java FAIL
+UnitTestSessionAction 1444721581618 TestGrid (1) FAIL
+FileOpenedAction 1444721607471 TestGrid.java 4189 9 94 9
+EditAction 1444721618068 TestGrid.java 4189 9 94 9
+UnitTestCaseAction 1444721620921 TestGrid.java FAIL
+UnitTestSessionAction 1444721620922 TestGrid (1) FAIL
+UnitTestCaseAction 1444721624757 TestGrid.java FAIL
+UnitTestSessionAction 1444721624758 TestGrid (1) FAIL
+UnitTestCaseAction 1444721626452 TestGrid.java FAIL
+UnitTestSessionAction 1444721626452 TestGrid (1) FAIL
+EditAction 1444721675984 TestGrid.java 4218 9 95 9
+EditAction 1444721678944 Grid.java 2062 7 21 0
+UnitTestCaseAction 1444721679995 TestGrid.java OK
+UnitTestSessionAction 1444721679995 TestGrid (1) OK
+UnitTestCaseAction 1444721693602 TestGrid.java OK
+UnitTestSessionAction 1444721693602 TestGrid (1) OK
+UnitTestCaseAction 1444721695368 TestGrid.java OK
+UnitTestSessionAction 1444721695368 TestGrid (1) OK
+UnitTestCaseAction 1444721696980 TestGrid.java FAIL
+UnitTestSessionAction 1444721696981 TestGrid (1) FAIL
+UnitTestCaseAction 1444721738478 TestGrid.java OK
+UnitTestSessionAction 1444721738478 TestGrid (1) OK
+UnitTestCaseAction 1444721739852 TestGrid.java FAIL
+UnitTestSessionAction 1444721739852 TestGrid (1) FAIL
+UnitTestCaseAction 1444721747960 TestGrid.java FAIL
+UnitTestSessionAction 1444721747961 TestGrid (1) FAIL
+EditAction 1444721800842 Grid.java 2067 7 20 0
+UnitTestCaseAction 1444721801848 TestGrid.java OK
+UnitTestSessionAction 1444721801849 TestGrid (1) OK
+UnitTestCaseAction 1444721805515 TestGrid.java OK
+UnitTestSessionAction 1444721805516 TestGrid (1) OK
+UnitTestCaseAction 1444721807027 TestGrid.java FAIL
+UnitTestSessionAction 1444721807028 TestGrid (1) FAIL
+UnitTestCaseAction 1444721809197 TestGrid.java FAIL
+UnitTestSessionAction 1444721809198 TestGrid (1) FAIL
+UnitTestCaseAction 1444721810984 TestGrid.java OK
+UnitTestSessionAction 1444721810985 TestGrid (1) OK
+UnitTestCaseAction 1444721812257 TestGrid.java FAIL
+UnitTestSessionAction 1444721812258 TestGrid (1) FAIL
+EditAction 1444721845877 Grid.java 2099 7 16 0
+CompilationAction 1444721846388 Grid.java
+EditAction 1444721868508 Grid.java 2099 7 21 0
+UnitTestCaseAction 1444721870965 TestGrid.java FAIL
+UnitTestSessionAction 1444721870965 TestGrid (1) FAIL
+EditAction 1444721906749 Grid.java 2120 7 21 0
+UnitTestCaseAction 1444721909108 TestGrid.java OK
+UnitTestSessionAction 1444721909109 TestGrid (1) OK
+EditAction 1444721957195 TestGrid.java 4220 9 94 9
+UnitTestCaseAction 1444721963627 TestGrid.java FAIL
+UnitTestSessionAction 1444721963627 TestGrid (1) FAIL
+UnitTestCaseAction 1444722005711 TestGrid.java OK
+UnitTestSessionAction 1444722005712 Rerun org.unioulu.tol.sqatlab.gameoflife.test.TestGrid.testSizeOfTheWholeGrid_gridSize2_returns4 OK
+UnitTestCaseAction 1444722008598 TestGrid.java FAIL
+UnitTestSessionAction 1444722008599 TestGrid (1) FAIL
+EditAction 1444722047035 Grid.java 2084 7 21 0
+UnitTestCaseAction 1444722050787 TestGrid.java FAIL
+UnitTestSessionAction 1444722050788 TestGrid (1) FAIL
+EditAction 1444722088886 Grid.java 2089 7 21 0
+UnitTestCaseAction 1444722090113 TestGrid.java OK
+UnitTestSessionAction 1444722090114 TestGrid (1) OK
+UnitTestCaseAction 1444722093502 TestGrid.java OK
+UnitTestSessionAction 1444722093502 TestGrid (1) OK
+UnitTestCaseAction 1444722097902 TestGrid.java FAIL
+UnitTestSessionAction 1444722097903 TestGrid (1) FAIL
+EditAction 1444722126879 Grid.java 2088 7 21 0
+UnitTestCaseAction 1444722127882 TestGrid.java OK
+UnitTestSessionAction 1444722127883 TestGrid (1) OK
+UnitTestCaseAction 1444722131321 TestGrid.java FAIL
+UnitTestSessionAction 1444722131322 TestGrid (1) FAIL
+EditAction 1444722161141 Grid.java 2120 7 21 0
+UnitTestCaseAction 1444722166408 TestGrid.java OK
+UnitTestSessionAction 1444722166408 TestGrid (1) OK
+UnitTestCaseAction 1444722248560 TestGrid.java FAIL
+UnitTestSessionAction 1444722248561 TestGrid (1) FAIL
+EditAction 1444722306030 Grid.java 2140 7 21 0
+UnitTestCaseAction 1444722309074 TestGrid.java FAIL
+UnitTestSessionAction 1444722309074 TestGrid (1) FAIL
+EditAction 1444722326934 Grid.java 2139 7 21 0
+CompilationAction 1444722327414 Grid.java
+CompilationAction 1444722330500 Grid.java
+EditAction 1444722403919 Grid.java 2191 7 21 0
+UnitTestCaseAction 1444722407832 TestGrid.java OK
+UnitTestSessionAction 1444722407832 TestGrid (1) OK
+UnitTestCaseAction 1444722414870 TestGrid.java FAIL
+UnitTestSessionAction 1444722414871 TestGrid (1) FAIL
+EditAction 1444722441234 Grid.java 2224 7 22 0
+UnitTestCaseAction 1444722445012 TestGrid.java OK
+UnitTestSessionAction 1444722445014 TestGrid (1) OK
+UnitTestCaseAction 1444722447556 TestGrid.java OK
+UnitTestSessionAction 1444722447556 TestGrid (1) OK
+UnitTestCaseAction 1444722456460 TestGrid.java OK
+UnitTestSessionAction 1444722456460 TestGrid (1) OK
+UnitTestCaseAction 1444722458544 TestGrid.java OK
+UnitTestSessionAction 1444722458545 TestGrid (1) OK
+UnitTestCaseAction 1444722460107 TestGrid.java FAIL
+UnitTestSessionAction 1444722460108 TestGrid (1) FAIL
+EditAction 1444722626159 Grid.java 2246 7 23 0
+EditAction 1444722685849 Grid.java 2224 7 22 0
+EditAction 1444722910296 Grid.java 2224 7 22 0
+EditAction 1444722989667 Grid.java 2241 7 23 0
+UnitTestCaseAction 1444722990951 TestGrid.java OK
+UnitTestSessionAction 1444722990952 TestGrid (1) OK
+UnitTestCaseAction 1444722993877 TestGrid.java OK
+UnitTestSessionAction 1444722993878 TestGrid (1) OK
+UnitTestCaseAction 1444722995428 TestGrid.java OK
+UnitTestSessionAction 1444722995429 TestGrid (1) OK
+UnitTestCaseAction 1444722996600 TestGrid.java OK
+UnitTestSessionAction 1444722996600 TestGrid (1) OK
+UnitTestCaseAction 1444722997698 TestGrid.java OK
+UnitTestSessionAction 1444722997699 TestGrid (1) OK
+UnitTestCaseAction 1444722998803 TestGrid.java OK
+UnitTestSessionAction 1444722998804 TestGrid (1) OK
+UnitTestCaseAction 1444722999753 TestGrid.java OK
+UnitTestSessionAction 1444722999754 TestGrid (1) OK
+UnitTestCaseAction 1444723000759 TestGrid.java OK
+UnitTestSessionAction 1444723000759 TestGrid (1) OK
+UnitTestCaseAction 1444723001746 TestGrid.java OK
+UnitTestSessionAction 1444723001747 TestGrid (1) OK
+UnitTestCaseAction 1444723002908 TestGrid.java OK
+UnitTestSessionAction 1444723002909 TestGrid (1) OK
+UnitTestCaseAction 1444723003953 TestGrid.java OK
+UnitTestSessionAction 1444723003954 TestGrid (1) OK
+UnitTestCaseAction 1444723005112 TestGrid.java OK
+UnitTestSessionAction 1444723005112 TestGrid (1) OK
+UnitTestCaseAction 1444723006170 TestGrid.java OK
+UnitTestSessionAction 1444723006171 TestGrid (1) OK
+UnitTestCaseAction 1444723007127 TestGrid.java OK
+UnitTestSessionAction 1444723007127 TestGrid (1) OK
+UnitTestCaseAction 1444723008533 TestGrid.java OK
+UnitTestSessionAction 1444723008534 TestGrid (1) OK
+UnitTestCaseAction 1444723009447 TestGrid.java OK
+UnitTestSessionAction 1444723009447 TestGrid (1) OK
+UnitTestCaseAction 1444723010677 TestGrid.java OK
+UnitTestSessionAction 1444723010677 TestGrid (1) OK
+EditAction 1444723029357 Grid.java 2241 7 23 0
+EditAction 1444723042793 Grid.java 2247 7 22 0
+UnitTestCaseAction 1444723045561 TestGrid.java OK
+UnitTestSessionAction 1444723045562 TestGrid (1) OK
+UnitTestCaseAction 1444723048384 TestGrid.java OK
+UnitTestSessionAction 1444723048384 TestGrid (1) OK
+UnitTestCaseAction 1444723050000 TestGrid.java OK
+UnitTestSessionAction 1444723050001 TestGrid (1) OK
+UnitTestCaseAction 1444723052192 TestGrid.java OK
+UnitTestSessionAction 1444723052192 TestGrid (1) OK
+UnitTestCaseAction 1444723053403 TestGrid.java OK
+UnitTestSessionAction 1444723053404 TestGrid (1) OK
+UnitTestCaseAction 1444723054533 TestGrid.java OK
+UnitTestSessionAction 1444723054533 TestGrid (1) OK
+UnitTestCaseAction 1444723055555 TestGrid.java OK
+UnitTestSessionAction 1444723055556 TestGrid (1) OK
+UnitTestCaseAction 1444723056590 TestGrid.java OK
+UnitTestSessionAction 1444723056591 TestGrid (1) OK
+UnitTestCaseAction 1444723057618 TestGrid.java OK
+UnitTestSessionAction 1444723057619 TestGrid (1) OK
+UnitTestCaseAction 1444723058731 TestGrid.java OK
+UnitTestSessionAction 1444723058732 TestGrid (1) OK
+UnitTestCaseAction 1444723059914 TestGrid.java OK
+UnitTestSessionAction 1444723059914 TestGrid (1) OK
+UnitTestCaseAction 1444723061019 TestGrid.java OK
+UnitTestSessionAction 1444723061019 TestGrid (1) OK
+UnitTestCaseAction 1444723062121 TestGrid.java OK
+UnitTestSessionAction 1444723062122 TestGrid (1) OK
+UnitTestCaseAction 1444723063188 TestGrid.java OK
+UnitTestSessionAction 1444723063189 TestGrid (1) OK
+UnitTestCaseAction 1444723064283 TestGrid.java OK
+UnitTestSessionAction 1444723064283 TestGrid (1) OK
+EditAction 1444723093833 Grid.java 2249 7 21 0
+UnitTestCaseAction 1444723096290 TestGrid.java OK
+UnitTestSessionAction 1444723096291 TestGrid (1) OK
+UnitTestCaseAction 1444723097677 TestGrid.java OK
+UnitTestSessionAction 1444723097678 TestGrid (1) OK
+UnitTestCaseAction 1444723099257 TestGrid.java OK
+UnitTestSessionAction 1444723099258 TestGrid (1) OK
+UnitTestCaseAction 1444723100130 TestGrid.java OK
+UnitTestSessionAction 1444723100131 TestGrid (1) OK
+UnitTestCaseAction 1444723101837 TestGrid.java OK
+UnitTestSessionAction 1444723101838 TestGrid (1) OK
+UnitTestCaseAction 1444723102763 TestGrid.java OK
+UnitTestSessionAction 1444723102764 TestGrid (1) OK
+UnitTestCaseAction 1444723103935 TestGrid.java OK
+UnitTestSessionAction 1444723103935 TestGrid (1) OK
+UnitTestCaseAction 1444723105043 TestGrid.java OK
+UnitTestSessionAction 1444723105043 TestGrid (1) OK
diff --git a/.besouro/2015101310222917/besouroEpisodes.txt b/.besouro/2015101310222917/besouroEpisodes.txt
new file mode 100644
index 0000000..27f89d8
--- /dev/null
+++ b/.besouro/2015101310222917/besouroEpisodes.txt
@@ -0,0 +1,76 @@
+1444721164635 production 1 215 false
+1444721169300 regression 1 0 true
+1444721170701 regression 1 0 true
+1444721171810 regression 1 0 true
+1444721179117 regression 1 0 true
+1444721221373 refactoring 2A 40 true
+1444721224010 regression 1 0 true
+1444721361609 refactoring 2A 136 true
+1444721361610 production 1 136 false
+1444721369690 regression 1 0 true
+1444721376569 regression 1 0 true
+1444721411132 regression 2 32 true
+1444721491923 refactoring 2A 79 true
+1444721503168 refactoring 2A 2 true
+1444721504512 regression 1 0 true
+1444721577207 production 1 71 false
+1444721679995 refactoring 3 98 true
+1444721693602 regression 1 0 true
+1444721695368 regression 1 0 true
+1444721738478 regression 2 41 true
+1444721801849 refactoring 2A 61 true
+1444721805516 regression 1 0 true
+1444721810985 regression 2 3 true
+1444721909109 production 1 96 false
+1444721909110 refactoring 2A 96 true
+1444722005712 refactoring 1A 48 true
+1444722090114 refactoring 2A 81 true
+1444722093502 regression 1 0 true
+1444722127883 refactoring 2A 29 true
+1444722166408 refactoring 2A 35 true
+1444722407832 refactoring 2A 159 true
+1444722445014 production 1 30 false
+1444722447556 regression 1 0 true
+1444722456460 regression 1 0 true
+1444722458545 regression 1 0 true
+1444722990952 production 1 530 false
+1444722990953 refactoring 2A 530 true
+1444722993878 regression 1 0 true
+1444722995429 regression 1 0 true
+1444722996600 regression 1 0 true
+1444722997699 regression 1 0 true
+1444722998804 regression 1 0 true
+1444722999754 regression 1 0 true
+1444723000759 regression 1 0 true
+1444723001747 regression 1 0 true
+1444723002909 regression 1 0 true
+1444723003954 regression 1 0 true
+1444723005112 regression 1 0 true
+1444723006171 regression 1 0 true
+1444723007127 regression 1 0 true
+1444723008534 regression 1 0 true
+1444723009447 regression 1 0 true
+1444723010677 regression 1 0 true
+1444723045562 refactoring 2A 16 true
+1444723048384 regression 1 0 true
+1444723050001 regression 1 0 true
+1444723052192 regression 1 0 true
+1444723053404 regression 1 0 true
+1444723054533 regression 1 0 true
+1444723055556 regression 1 0 true
+1444723056591 regression 1 0 true
+1444723057619 regression 1 0 true
+1444723058732 regression 1 0 true
+1444723059914 regression 1 0 true
+1444723061019 regression 1 0 true
+1444723062122 regression 1 0 true
+1444723063189 regression 1 0 true
+1444723064283 regression 1 0 true
+1444723096291 refactoring 2A 2 true
+1444723097678 regression 1 0 true
+1444723099258 regression 1 0 true
+1444723100131 regression 1 0 true
+1444723101838 regression 1 0 true
+1444723102764 regression 1 0 true
+1444723103935 regression 1 0 true
+1444723105043 regression 1 0 true
diff --git a/.besouro/2015101310222917/disagreements.txt b/.besouro/2015101310222917/disagreements.txt
new file mode 100644
index 0000000..e69de29
diff --git a/.besouro/2015101310222917/randomHeuristicEpisodes.txt b/.besouro/2015101310222917/randomHeuristicEpisodes.txt
new file mode 100644
index 0000000..efc262a
--- /dev/null
+++ b/.besouro/2015101310222917/randomHeuristicEpisodes.txt
@@ -0,0 +1,73 @@
+1444721164635 production 1 215 true
+1444721169300 regression 1 0 true
+1444721170701 regression 1 0 true
+1444721171810 regression 1 0 false
+1444721179117 regression 1 0 true
+1444721221373 refactoring 2A 40 false
+1444721224010 regression 1 0 false
+1444721361609 refactoring 2A 136 false
+1444721369690 regression 1 0 true
+1444721376569 regression 1 0 true
+1444721411132 regression 2 32 true
+1444721491923 refactoring 2A 79 true
+1444721503168 refactoring 2A 2 true
+1444721504512 regression 1 0 true
+1444721577207 production 1 71 false
+1444721679995 refactoring 3 98 true
+1444721693602 regression 1 0 false
+1444721695368 regression 1 0 false
+1444721738478 regression 2 41 true
+1444721801849 refactoring 2A 61 false
+1444721805516 regression 1 0 true
+1444721810985 regression 2 3 true
+1444721909109 production 1 96 true
+1444722005712 refactoring 1A 48 true
+1444722090114 refactoring 2A 81 false
+1444722093502 regression 1 0 false
+1444722127883 refactoring 2A 29 false
+1444722166408 refactoring 2A 35 true
+1444722407832 refactoring 2A 159 true
+1444722445014 production 1 30 false
+1444722447556 regression 1 0 true
+1444722456460 regression 1 0 false
+1444722458545 regression 1 0 false
+1444722990952 production 1 530 true
+1444722993878 regression 1 0 false
+1444722995429 regression 1 0 true
+1444722996600 regression 1 0 true
+1444722997699 regression 1 0 true
+1444722998804 regression 1 0 true
+1444722999754 regression 1 0 true
+1444723000759 regression 1 0 true
+1444723001747 regression 1 0 true
+1444723002909 regression 1 0 true
+1444723003954 regression 1 0 false
+1444723005112 regression 1 0 true
+1444723006171 regression 1 0 false
+1444723007127 regression 1 0 false
+1444723008534 regression 1 0 false
+1444723009447 regression 1 0 true
+1444723010677 regression 1 0 true
+1444723045562 refactoring 2A 16 true
+1444723048384 regression 1 0 true
+1444723050001 regression 1 0 true
+1444723052192 regression 1 0 true
+1444723053404 regression 1 0 false
+1444723054533 regression 1 0 true
+1444723055556 regression 1 0 true
+1444723056591 regression 1 0 false
+1444723057619 regression 1 0 false
+1444723058732 regression 1 0 true
+1444723059914 regression 1 0 false
+1444723061019 regression 1 0 true
+1444723062122 regression 1 0 false
+1444723063189 regression 1 0 false
+1444723064283 regression 1 0 true
+1444723096291 refactoring 2A 2 true
+1444723097678 regression 1 0 false
+1444723099258 regression 1 0 false
+1444723100131 regression 1 0 false
+1444723101838 regression 1 0 true
+1444723102764 regression 1 0 false
+1444723103935 regression 1 0 false
+1444723105043 regression 1 0 true
diff --git a/.besouro/2015101310222917/userComments.txt b/.besouro/2015101310222917/userComments.txt
new file mode 100644
index 0000000..e69de29
diff --git a/.besouro/2015101310222917/zorroEpisodes.txt b/.besouro/2015101310222917/zorroEpisodes.txt
new file mode 100644
index 0000000..7ac399e
--- /dev/null
+++ b/.besouro/2015101310222917/zorroEpisodes.txt
@@ -0,0 +1,73 @@
+1444721164635 production 1 215 false
+1444721169300 regression 1 4 false
+1444721170701 regression 1 1 false
+1444721171810 regression 1 1 false
+1444721179117 regression 1 7 false
+1444721221373 refactoring 2A 42 false
+1444721224010 regression 1 2 false
+1444721361609 refactoring 2A 137 false
+1444721369690 regression 1 8 false
+1444721376569 regression 1 6 false
+1444721411132 regression 2 34 false
+1444721491923 refactoring 2A 80 false
+1444721503168 refactoring 2A 11 false
+1444721504512 regression 1 1 false
+1444721577207 production 1 72 false
+1444721679995 refactoring 3 102 false
+1444721693602 regression 1 13 false
+1444721695368 regression 1 1 false
+1444721738478 regression 2 43 false
+1444721801849 refactoring 2A 63 false
+1444721805516 regression 1 3 false
+1444721810985 regression 2 5 false
+1444721909109 production 1 98 false
+1444722005712 refactoring 1A 96 false
+1444722090114 refactoring 2A 84 false
+1444722093502 regression 1 3 false
+1444722127883 refactoring 2A 34 false
+1444722166408 refactoring 2A 38 false
+1444722407832 refactoring 2A 241 false
+1444722445014 production 1 37 false
+1444722447556 regression 1 2 false
+1444722456460 regression 1 8 false
+1444722458545 regression 1 2 false
+1444722990952 production 1 532 false
+1444722993878 regression 1 2 false
+1444722995429 regression 1 1 false
+1444722996600 regression 1 1 false
+1444722997699 regression 1 1 false
+1444722998804 regression 1 1 false
+1444722999754 regression 1 0 false
+1444723000759 regression 1 1 false
+1444723001747 regression 1 0 false
+1444723002909 regression 1 1 false
+1444723003954 regression 1 1 false
+1444723005112 regression 1 1 false
+1444723006171 regression 1 1 false
+1444723007127 regression 1 0 false
+1444723008534 regression 1 1 false
+1444723009447 regression 1 0 false
+1444723010677 regression 1 1 false
+1444723045562 refactoring 2A 34 false
+1444723048384 regression 1 2 false
+1444723050001 regression 1 1 false
+1444723052192 regression 1 2 false
+1444723053404 regression 1 1 false
+1444723054533 regression 1 1 false
+1444723055556 regression 1 1 false
+1444723056591 regression 1 1 false
+1444723057619 regression 1 1 false
+1444723058732 regression 1 1 false
+1444723059914 regression 1 1 false
+1444723061019 regression 1 1 false
+1444723062122 regression 1 1 false
+1444723063189 regression 1 1 false
+1444723064283 regression 1 1 false
+1444723096291 refactoring 2A 32 false
+1444723097678 regression 1 1 false
+1444723099258 regression 1 1 false
+1444723100131 regression 1 0 false
+1444723101838 regression 1 1 false
+1444723102764 regression 1 0 false
+1444723103935 regression 1 1 false
+1444723105043 regression 1 1 false
diff --git a/.classpath b/.classpath
index 3e0fb27..2d74975 100644
--- a/.classpath
+++ b/.classpath
@@ -1,7 +1,7 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java
index 08585f2..5a8964b 100644
--- a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java
+++ b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java
@@ -5,12 +5,8 @@ public class Cell {
int x;
int y;
- public Cell(String initialState) {
+ public Cell(String initialState, int x, int y) {
this.state = initialState;
- }
-
-
- public Cell(int x, int y) {
this.x = x;
this.y = y;
}
@@ -26,7 +22,9 @@ public int getY() {
public void nextIteration(int numOfLiveCells) {
if (state == "Alive" && numOfLiveCells < 2)
state = "Dead";
- else
+ else if(state == "Alive" && numOfLiveCells > 3)
+ state = "Dead";
+ else
state = "Alive";
}
@@ -38,6 +36,7 @@ public Object getState() {
public int hashCode() {
final int prime = 31;
int result = 1;
+ result = prime * result + ((state == null) ? 0 : state.hashCode());
result = prime * result + x;
result = prime * result + y;
return result;
@@ -52,12 +51,19 @@ public boolean equals(Object obj) {
if (getClass() != obj.getClass())
return false;
Cell other = (Cell) obj;
+ if (state == null) {
+ if (other.state != null)
+ return false;
+ } else if (!state.equals(other.state))
+ return false;
if (x != other.x)
return false;
if (y != other.y)
return false;
return true;
}
+
+
diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/GameOfLife.java b/src/org/unioulu/tol/sqatlab/gameoflife/GameOfLife.java
index dbd5f88..81b3c40 100644
--- a/src/org/unioulu/tol/sqatlab/gameoflife/GameOfLife.java
+++ b/src/org/unioulu/tol/sqatlab/gameoflife/GameOfLife.java
@@ -1,5 +1,26 @@
package org.unioulu.tol.sqatlab.gameoflife;
public class GameOfLife {
+
+ public GameOfLife(){
+
+ }
+ public String printLife(Grid grid) {
+ String life = "";
+ for(int j = 0; j < Math.sqrt(grid.cells.size()); j++){
+ for(int i = 0; i < Math.sqrt(grid.cells.size()); i++){
+ Cell aliveCell = new Cell("Alive", i, j);
+ if (grid.cells.contains(aliveCell))
+ life = life + "*";
+ else life = life + "-";
+ }
+ if (j cells = new HashSet<>();
+ public Set cells;
+
+ public Grid(){
+
+ cells = new HashSet<>();
+ }
+ int triesToGetBalancedInitialGrid =1;
public int getNumNeighbors(Cell cell) {
int numNeighbors = 0;
- Set neighborhood = new HashSet | ();
+
for (int dx=-1; dx<=1; dx ++) {
for (int dy=-1; dy<=1; dy ++) {
- Cell neighbor = new Cell(cell.x + dx, cell.y + dy);
+ Cell neighbor = new Cell("Alive",cell.x + dx, cell.y + dy);
if (cells.contains(neighbor)) {
numNeighbors++;
}
}
}
- return numNeighbors-1;
+ if(cell.getState().equals("Alive")){
+ return numNeighbors-1;
+ }
+ return numNeighbors;
}
public void addCell(Cell cell) {
cells.add(cell);
}
+
+ public void fillGrid(int gridSize) {
+ int counter = 0;
+ cells.clear();
+ Cell[] cellArray = new Cell[gridSize*gridSize];
+ for(int i = 0; i < gridSize; i++){
+ for(int j = 0; j < gridSize; j++){
+ cellArray[counter] = new Cell(randomState(), i, j);
+ addCell(cellArray[counter]);
+ counter++;
+ }
+ }
+
+ //System.out.println(triesToGetBalancedInitialGrid);
+ if(triesToGetBalancedInitialGrid>=10){
+ System.out.println("Initial grid might be unbalanced");
+ //System.out.println("eins");
+ }
+ else if(checkPercentageOfAliveCells() && triesToGetBalancedInitialGrid<10){
+ triesToGetBalancedInitialGrid++;
+ fillGrid(gridSize);
+ //System.out.println("zwei");
+ }
+ //System.out.println("end method");
+ }
+
+
+ public int getNumAliveCells() {
+ int numAliveCells = 0;
+
+ for(int i = 0; i < cells.size(); i++){
+ for(int j = 0; j < cells.size(); j++){
+ Cell aliveCell = new Cell("Alive", i, j);
+ if (cells.contains(aliveCell))
+ numAliveCells++;
+ }
+ }
+ return numAliveCells;
+ }
+
+
+ public boolean checkPercentageOfAliveCells() {
+ double percentageOfAliveCells = 0;
+ percentageOfAliveCells = getNumAliveCells()*100/cells.size();
+ //System.out.println(getNumAliveCells() + " " + cells.size() + " = " + percentageOfAliveCells);
+ if(percentageOfAliveCells>60 || percentageOfAliveCells<40)return false;
+ else return true;
+ }
+ public String randomState(){
+ String randomState = "";
+ double randomNumber = Math.floor((Math.random() * 100) + 1);
+ if(randomNumber<50){
+ randomState = "Alive";
+ }else{
+ randomState ="Dead";
+ }
+ return randomState;
+ }
+
}
diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/GameOfLifeTest.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/GameOfLifeTest.java
new file mode 100644
index 0000000..9ce5f36
--- /dev/null
+++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/GameOfLifeTest.java
@@ -0,0 +1,35 @@
+package org.unioulu.tol.sqatlab.gameoflife.test;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.unioulu.tol.sqatlab.gameoflife.Cell;
+import org.unioulu.tol.sqatlab.gameoflife.GameOfLife;
+import org.unioulu.tol.sqatlab.gameoflife.Grid;
+
+public class GameOfLifeTest {
+
+
+
+
+ @Test
+ public void testPrintLife() {
+ GameOfLife game = new GameOfLife();
+ Grid grid = new Grid();
+ Cell cell1 = new Cell("Alive",0,0);
+ Cell cell2 = new Cell("Dead",1,0);
+ Cell cell3 = new Cell("Alive",0,1);
+ Cell cell4 = new Cell("Dead",1,1);
+
+ grid.addCell(cell1);
+ grid.addCell(cell2);
+ grid.addCell(cell3);
+ grid.addCell(cell4);
+
+ String gridLife = "*-\n*-";
+ System.out.println(gridLife);
+ System.out.println(game.printLife(grid));
+ assertEquals(gridLife, game.printLife(grid));
+ }
+
+}
diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java
index cfe527a..83f8def 100644
--- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java
+++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java
@@ -2,30 +2,55 @@
import static org.junit.Assert.*;
+import org.junit.Before;
import org.junit.Test;
import org.unioulu.tol.sqatlab.gameoflife.Cell;
public class TestCell {
+
+ private Cell aliveCell;
+ private Cell deadCell;
+
+ @Before
+ public void setup(){
+ aliveCell = new Cell("Alive", 0, 0);
+ deadCell = new Cell("Dead", 0, 0);
+ }
@Test
public void testLiveCellWithNoNeighborsShouldDie() {
//arrange
- Cell cell = new Cell("Alive");
+
//
- cell.nextIteration(0);
+ aliveCell.nextIteration(0);
//assert
- assertEquals("Dead", cell.getState());
+ assertEquals("Dead", aliveCell.getState());
}
@Test
public void testLiveCellWithTwoNeighborsShouldLive() {
//arrange
- Cell cell = new Cell("Alive");
+
//
- cell.nextIteration(2);
+ aliveCell.nextIteration(2);
//assert
- assertEquals("Alive", cell.getState());
+ assertEquals("Alive", aliveCell.getState());
+ }
+ @Test
+ public void testCellUpdateAliveCellWithFourNeighborsShouldDie() {
+
+ //act
+ aliveCell.nextIteration(4);
+ //
+ assertEquals("Dead", aliveCell.getState());
+ }
+ @Test
+ public void testCellUpdateDeadCellWithThreeNeighborsShouldLive() {
+
+ //act
+ deadCell.nextIteration(3);
+ //
+ assertEquals("Alive", deadCell.getState());
}
-
}
diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java
index eab5959..7f82e14 100644
--- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java
+++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java
@@ -1,54 +1,170 @@
-package org.unioulu.tol.sqatlab.gameoflife.test;
-
-import static org.junit.Assert.*;
-import org.junit.Test;
-import org.unioulu.tol.sqatlab.gameoflife.Cell;
-import org.unioulu.tol.sqatlab.gameoflife.Grid;
-
-public class TestGrid {
-
- @Test
- public void testSingleCellOnGridHasNoNeighbors() {
- //arrange
- Grid grid = new Grid();
- Cell cell = new Cell(0,0);
-
- grid.addCell(cell);
-
- int numNeighbors = grid.getNumNeighbors(cell);
-
- assertEquals(0, numNeighbors);
- }
-
- @Test
- public void testTwoNeighborCellsShouldHaveOneNeigbor() {
- //arrange
- Grid grid = new Grid();
- Cell cell1 = new Cell(0,0);
- Cell cell2 = new Cell(0,1);
-
- grid.addCell(cell1);
- grid.addCell(cell2);
-
- int numNeighbors = grid.getNumNeighbors(cell1);
- assertEquals(1, numNeighbors);
-
- }
-
- @Test
- public void testTwoNeighborCellsOnDifferentRowsShouldHaveOneNeigbor() {
- //arrange
- Grid grid = new Grid();
- Cell cell1 = new Cell(0,0);
- Cell cell2 = new Cell(1,0);
-
- grid.addCell(cell1);
- grid.addCell(cell2);
-
- int numNeighbors = grid.getNumNeighbors(cell1);
- assertEquals(1, numNeighbors);
-
- }
-
-
-}
+package org.unioulu.tol.sqatlab.gameoflife.test;
+
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.unioulu.tol.sqatlab.gameoflife.Cell;
+import org.unioulu.tol.sqatlab.gameoflife.Grid;
+
+
+public class TestGrid {
+
+ @Test
+ public void testSingleCellOnGridHasNoNeighbors() {
+ //arrange
+ Grid grid = new Grid();
+ Cell cell = new Cell("Alive",0,0);
+
+ grid.addCell(cell);
+
+ int numNeighbors = grid.getNumNeighbors(cell);
+
+ assertEquals(0, numNeighbors);
+ }
+
+ @Test
+ public void testTwoNeighborCellsShouldHaveOneNeigbor() {
+ //arrange
+ Grid grid = new Grid();
+ Cell cell1 = new Cell("Alive",0,0);
+ Cell cell2 = new Cell("Alive",0,1);
+
+ grid.addCell(cell1);
+ grid.addCell(cell2);
+
+ int numNeighbors = grid.getNumNeighbors(cell1);
+ assertEquals(1, numNeighbors);
+
+ }
+
+
+ @Test
+ public void testTwoNeighborCellsOnDifferentRowsShouldHaveOneNeigbor() {
+ //arrange
+ Grid grid = new Grid();
+ Cell cell1 = new Cell("Alive",0,0);
+ Cell cell2 = new Cell("Alive",1,0);
+
+ grid.addCell(cell1);
+ grid.addCell(cell2);
+
+ int numNeighbors = grid.getNumNeighbors(cell1);
+ assertEquals(1, numNeighbors);
+
+ }
+
+ @Test
+ public void testFillGridWithIsEmpty_ReturnFalse(){
+ //arrange
+ Grid grid = new Grid();
+ int gridSize = 2;
+
+ grid.fillGrid(gridSize);
+
+ assertEquals(false, grid.cells.isEmpty());
+ }
+
+ @Test
+ public void testSizeOfTheWholeGrid_gridSize2_returns4(){
+ Grid grid = new Grid();
+ int gridSize = 2;
+
+ grid.fillGrid(gridSize);
+ //System.out.println(gridSize);
+ assertEquals(4, grid.cells.size());
+ }
+
+ @Test
+ public void testCountAliveCellsinGrid(){
+ Grid grid = new Grid();
+ Cell cell1 = new Cell("Dead",0,0);
+ Cell cell2 = new Cell("Alive",1,0);
+
+ grid.addCell(cell1);
+ grid.addCell(cell2);
+
+ int aliveCells = grid.getNumAliveCells();
+ assertEquals(1, aliveCells);
+ }
+ @Test
+ public void testCheckPercentageOfAliveCells_GridWithOnlyAliveCells_returnFalse(){
+ Grid grid = new Grid();
+ Cell cell1 = new Cell("Alive",0,0);
+ Cell cell2 = new Cell("Alive",1,0);
+ Cell cell3 = new Cell("Alive",0,1);
+ Cell cell4 = new Cell("Alive",1,1);
+ Cell cell5 = new Cell("Alive",2,0);
+ Cell cell6 = new Cell("Alive",0,2);
+ Cell cell7 = new Cell("Alive",1,2);
+ Cell cell8 = new Cell("Alive",2,1);
+ Cell cell9 = new Cell("Alive",2,2);
+
+ grid.addCell(cell1);
+ grid.addCell(cell2);
+ grid.addCell(cell3);
+ grid.addCell(cell4);
+ grid.addCell(cell5);
+ grid.addCell(cell6);
+ grid.addCell(cell7);
+ grid.addCell(cell8);
+ grid.addCell(cell9);
+
+
+ assertEquals(false, grid.checkPercentageOfAliveCells());
+
+ }
+ @Test
+ public void testCheckPercentageOfAliveCells_GridWithOnlyDeadCells_returnFalse(){
+ Grid grid = new Grid();
+ Cell cell1 = new Cell("Dead",0,0);
+ Cell cell2 = new Cell("Dead",1,0);
+ Cell cell3 = new Cell("Dead",0,1);
+ Cell cell4 = new Cell("Dead",1,1);
+ Cell cell5 = new Cell("Dead",2,0);
+ Cell cell6 = new Cell("Dead",0,2);
+ Cell cell7 = new Cell("Dead",1,2);
+ Cell cell8 = new Cell("Dead",2,1);
+ Cell cell9 = new Cell("Dead",2,2);
+
+ grid.addCell(cell1);
+ grid.addCell(cell2);
+ grid.addCell(cell3);
+ grid.addCell(cell4);
+ grid.addCell(cell5);
+ grid.addCell(cell6);
+ grid.addCell(cell7);
+ grid.addCell(cell8);
+ grid.addCell(cell9);
+
+
+ assertEquals(false, grid.checkPercentageOfAliveCells());
+
+ }
+ @Test
+ public void testCheckPercentageOfAliveCells_GridWith5Dead4AliveCells_returnTrue(){
+ Grid grid = new Grid();
+ Cell cell1 = new Cell("Dead",0,0);
+ Cell cell2 = new Cell("Dead",1,0);
+ Cell cell3 = new Cell("Dead",0,1);
+ Cell cell4 = new Cell("Dead",1,1);
+ Cell cell5 = new Cell("Dead",2,0);
+ Cell cell6 = new Cell("Alive",0,2);
+ Cell cell7 = new Cell("Alive",1,2);
+ Cell cell8 = new Cell("Alive",2,1);
+ Cell cell9 = new Cell("Alive",2,2);
+
+ grid.addCell(cell1);
+ grid.addCell(cell2);
+ grid.addCell(cell3);
+ grid.addCell(cell4);
+ grid.addCell(cell5);
+ grid.addCell(cell6);
+ grid.addCell(cell7);
+ grid.addCell(cell8);
+ grid.addCell(cell9);
+
+
+ assertEquals(true, grid.checkPercentageOfAliveCells());
+
+ }
+
+}
| | |