From d2af665b723e94fe55c61aca76a2fcacdc370ee0 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 8 Oct 2015 12:41:02 +0300 Subject: [PATCH 01/10] besouro automatic message --- .besouro/2015100812403882/actions.txt | 2 ++ .besouro/2015100812403882/besouroEpisodes.txt | 0 .besouro/2015100812403882/disagreements.txt | 0 .besouro/2015100812403882/randomHeuristicEpisodes.txt | 0 .besouro/2015100812403882/userComments.txt | 0 .besouro/2015100812403882/zorroEpisodes.txt | 0 src/org/unioulu/tol/sqatlab/gameoflife/Cell.java | 8 ++++++++ 7 files changed, 10 insertions(+) create mode 100644 .besouro/2015100812403882/actions.txt create mode 100644 .besouro/2015100812403882/besouroEpisodes.txt create mode 100644 .besouro/2015100812403882/disagreements.txt create mode 100644 .besouro/2015100812403882/randomHeuristicEpisodes.txt create mode 100644 .besouro/2015100812403882/userComments.txt create mode 100644 .besouro/2015100812403882/zorroEpisodes.txt diff --git a/.besouro/2015100812403882/actions.txt b/.besouro/2015100812403882/actions.txt new file mode 100644 index 0000000..5bb118b --- /dev/null +++ b/.besouro/2015100812403882/actions.txt @@ -0,0 +1,2 @@ +FileOpenedAction 1444297238585 Cell.java 68 1 3 0 +EditAction 1444297262434 Cell.java 224 1 3 0 diff --git a/.besouro/2015100812403882/besouroEpisodes.txt b/.besouro/2015100812403882/besouroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/2015100812403882/disagreements.txt b/.besouro/2015100812403882/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/2015100812403882/randomHeuristicEpisodes.txt b/.besouro/2015100812403882/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/2015100812403882/userComments.txt b/.besouro/2015100812403882/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/2015100812403882/zorroEpisodes.txt b/.besouro/2015100812403882/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java index b66e9c8..98f8b49 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java @@ -1,5 +1,13 @@ package org.unioulu.tol.sqatlab.gameoflife; public class Cell { + public int collum; + public int row; + public int neighbor; + public Cell(int collum, int row) { + this.collum = collum; + this.row = row; + neighbor = 0; + } } From 99a948107ea4f624c9ce4e618223053ee47694fd Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 8 Oct 2015 12:41:02 +0300 Subject: [PATCH 02/10] besouro automatic message --- .besouro/2015100812403882/actions.txt | 1 + src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.besouro/2015100812403882/actions.txt b/.besouro/2015100812403882/actions.txt index 5bb118b..2931ab8 100644 --- a/.besouro/2015100812403882/actions.txt +++ b/.besouro/2015100812403882/actions.txt @@ -1,2 +1,3 @@ FileOpenedAction 1444297238585 Cell.java 68 1 3 0 EditAction 1444297262434 Cell.java 224 1 3 0 +EditAction 1444297262571 TestCell.java 359 1 3 1 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java index d8de09e..66dad34 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java @@ -3,12 +3,16 @@ import static org.junit.Assert.*; import org.junit.Test; +import org.unioulu.tol.sqatlab.gameoflife.Cell; public class TestCell { + Cell cell = new Cell(); @Test - public void test() { - fail("Not yet implemented"); + public void testLiveCellWithNoNeighborDies() { + Cell cell = new Cell("Alive"); + cell.update(); + assertEquals("Dead", cell.getState()); } } From 6cf4bc758626fe22d6acf8ae18f8a904cd862b2c Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 8 Oct 2015 12:41:02 +0300 Subject: [PATCH 03/10] besouro automatic message --- .besouro/2015100812403882/actions.txt | 1 + src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/2015100812403882/actions.txt b/.besouro/2015100812403882/actions.txt index 2931ab8..c713b73 100644 --- a/.besouro/2015100812403882/actions.txt +++ b/.besouro/2015100812403882/actions.txt @@ -1,3 +1,4 @@ FileOpenedAction 1444297238585 Cell.java 68 1 3 0 EditAction 1444297262434 Cell.java 224 1 3 0 EditAction 1444297262571 TestCell.java 359 1 3 1 +EditAction 1444297262646 TestGrid.java 170 1 0 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index 9614d55..0fc5b1e 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -7,7 +7,7 @@ public class TestGrid { @Test public void test() { - fail("Not yet implemented"); + } } From 205f34318c45ddb645df37ef5d21b1113e9ae59b Mon Sep 17 00:00:00 2001 From: thomaspetry Date: Thu, 8 Oct 2015 12:41:27 +0300 Subject: [PATCH 04/10] test --- .besouro/2015100812403882/actions.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.besouro/2015100812403882/actions.txt b/.besouro/2015100812403882/actions.txt index c713b73..f6d7bd2 100644 --- a/.besouro/2015100812403882/actions.txt +++ b/.besouro/2015100812403882/actions.txt @@ -2,3 +2,7 @@ FileOpenedAction 1444297238585 Cell.java 68 1 3 0 EditAction 1444297262434 Cell.java 224 1 3 0 EditAction 1444297262571 TestCell.java 359 1 3 1 EditAction 1444297262646 TestGrid.java 170 1 0 0 +CompilationAction 1444297263285 TestCell.java +CompilationAction 1444297263285 TestCell.java +CompilationAction 1444297263285 TestCell.java +CompilationAction 1444297263285 TestCell.java From e54766f2a756c777cd4fd77c76f1a55511cecfc3 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 8 Oct 2015 13:21:07 +0300 Subject: [PATCH 05/10] besouro automatic message --- .besouro/2015100812403882/actions.txt | 22 ++++++++++++++ .../unioulu/tol/sqatlab/gameoflife/Cell.java | 30 ++++++++++++++----- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/.besouro/2015100812403882/actions.txt b/.besouro/2015100812403882/actions.txt index f6d7bd2..1cea376 100644 --- a/.besouro/2015100812403882/actions.txt +++ b/.besouro/2015100812403882/actions.txt @@ -6,3 +6,25 @@ CompilationAction 1444297263285 TestCell.java CompilationAction 1444297263285 TestCell.java CompilationAction 1444297263285 TestCell.java CompilationAction 1444297263285 TestCell.java +RefactoringAction 1444297514842 Cell.java ADD void update() METHOD +RefactoringAction 1444297544363 Cell.java RENAME Cell(int, int)=>void cell(int, int) METHOD +RefactoringAction 1444297549873 Cell.java RENAME cell(int, int)=>Cell(int, int) METHOD +RefactoringAction 1444297641892 Cell.java ADD int getNeighbors() METHOD +RefactoringAction 1444297650908 Cell.java RENAME getNeighbors()=>int getNeighbours() METHOD +RefactoringAction 1444297661423 Cell.java RENAME neighbor=>int neighbour FIELD +RefactoringAction 1444297749945 Cell.java REMOVE update() METHOD +RefactoringAction 1444297752844 Grid.java ADD void update() METHOD +RefactoringAction 1444298186590 Cell.java RENAME collum=>int x FIELD +RefactoringAction 1444298187598 Cell.java RENAME row=>int y FIELD +RefactoringAction 1444298234672 Cell.java ADD String state FIELD +RefactoringAction 1444298450978 Cell.java ADD import java.util.Random IMPORT +RefactoringAction 1444298992326 Grid.java ADD Cell FIELD +RefactoringAction 1444299004848 Grid.java RENAME cell=>Array FIELD +RefactoringAction 1444299005853 Grid.java RENAME cel=>Array FIELD +RefactoringAction 1444299067428 Grid.java REMOVE cell FIELD +RefactoringAction 1444299068934 Grid.java ADD int FIELD +RefactoringAction 1444299097455 Grid.java ADD void start FIELD +RefactoringAction 1444299104462 Grid.java RENAME start=>void start() METHOD +RefactoringAction 1444299270017 Grid.java REMOVE grid FIELD +RefactoringAction 1444299317246 Grid.java ADD int FIELD +EditAction 1444299667104 Cell.java 454 2 7 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java index 98f8b49..b28b83e 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java @@ -1,13 +1,29 @@ package org.unioulu.tol.sqatlab.gameoflife; +import java.util.Random; + public class Cell { - public int collum; - public int row; - public int neighbor; + public int x; + public int y; + public int neighbour; + public String state; - public Cell(int collum, int row) { - this.collum = collum; - this.row = row; - neighbor = 0; + public Cell(int x, int y) { + this.x = x; + this.y = y; + neighbour = 0; + Random rand = new Random(); + int randstate = rand.nextInt(1); + if (randstate == 0) { + state = "-"; + } + else if (randstate == 1) { + state = "*"; + } + + } + + public int getNeighbours() { + return 0; } } From c72d7562df61232f19e8ed9df37cd64083400397 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 8 Oct 2015 13:21:07 +0300 Subject: [PATCH 06/10] besouro automatic message --- .besouro/2015100812403882/actions.txt | 1 + src/org/unioulu/tol/sqatlab/gameoflife/Grid.java | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/.besouro/2015100812403882/actions.txt b/.besouro/2015100812403882/actions.txt index 1cea376..5efa734 100644 --- a/.besouro/2015100812403882/actions.txt +++ b/.besouro/2015100812403882/actions.txt @@ -28,3 +28,4 @@ RefactoringAction 1444299104462 Grid.java RENAME start=>void start() METHOD RefactoringAction 1444299270017 Grid.java REMOVE grid FIELD RefactoringAction 1444299317246 Grid.java ADD int FIELD EditAction 1444299667104 Cell.java 454 2 7 0 +EditAction 1444299667181 Grid.java 271 2 1 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index 19dbf0b..3bae895 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -1,5 +1,17 @@ package org.unioulu.tol.sqatlab.gameoflife; public class Grid { + public int[][] grid = new int[9][9]; + + public void start() { + for(int i = 0; i < grid.length; i++) { + for(int j = 0; j < grid.length; j++) { + Cell(i,j); + } + } + } + public void update() { + + } } From aca98cfc518d511ebfb88d9f55d0c5f14d8def70 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 8 Oct 2015 13:47:50 +0300 Subject: [PATCH 07/10] besouro automatic message --- .besouro/2015100812403882/actions.txt | 22 +++++++++++++++++++ .../unioulu/tol/sqatlab/gameoflife/Cell.java | 21 ++++++++++++++---- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/.besouro/2015100812403882/actions.txt b/.besouro/2015100812403882/actions.txt index 5efa734..e2b293e 100644 --- a/.besouro/2015100812403882/actions.txt +++ b/.besouro/2015100812403882/actions.txt @@ -29,3 +29,25 @@ RefactoringAction 1444299270017 Grid.java REMOVE grid FIELD RefactoringAction 1444299317246 Grid.java ADD int FIELD EditAction 1444299667104 Cell.java 454 2 7 0 EditAction 1444299667181 Grid.java 271 2 1 0 +CompilationAction 1444299667767 Grid.java +CompilationAction 1444299667768 TestCell.java +CompilationAction 1444299667768 TestCell.java +CompilationAction 1444299667768 TestCell.java +CompilationAction 1444299667768 TestCell.java +RefactoringAction 1444299835261 Grid.java ADD Cell Cell FIELD +RefactoringAction 1444299860907 Cell.java RENAME Cell(int, int)=>void cell(int, int) METHOD +RefactoringAction 1444299864407 Grid.java RENAME Cell=>Cell cell FIELD +RefactoringAction 1444300133760 Grid.java ADD void cell(int, int) METHOD +RefactoringAction 1444300140146 Grid.java REMOVE cell(int, int) METHOD +RefactoringAction 1444300213684 Grid.java RENAME cell=>Cell zelle FIELD +RefactoringAction 1444300341260 Cell.java ADD int getNeighbour() METHOD +RefactoringAction 1444300341260 Cell.java ADD void setNeighbour(int) METHOD +RefactoringAction 1444300341260 Cell.java ADD String getState() METHOD +RefactoringAction 1444300341260 Cell.java ADD void setState(String) METHOD +RefactoringAction 1444300548184 Cell.java REMOVE getNeighbours() METHOD +RefactoringAction 1444300619598 Grid.java ADD void neighboursett FIELD +RefactoringAction 1444300620605 Grid.java RENAME neighboursett=>void neighboursetting FIELD +RefactoringAction 1444300624112 Grid.java RENAME neighboursetting=>void neighboursetting() METHOD +RefactoringAction 1444300654146 Grid.java RENAME neighboursetting()=>void neighboursetting(int) METHOD +RefactoringAction 1444300655654 Grid.java RENAME neighboursetting(int)=>void neighboursetting(int, int) METHOD +EditAction 1444301270142 Cell.java 656 5 10 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java index b28b83e..31b1c22 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java @@ -8,7 +8,23 @@ public class Cell { public int neighbour; public String state; - public Cell(int x, int y) { + public int getNeighbour() { + return neighbour; + } + + public void setNeighbour(int neighbour) { + this.neighbour = neighbour; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public void cell(int x, int y) { this.x = x; this.y = y; neighbour = 0; @@ -23,7 +39,4 @@ else if (randstate == 1) { } - public int getNeighbours() { - return 0; - } } From 2640472f3be5cf65d6a7e9525d7b4a7e3c6d2dab Mon Sep 17 00:00:00 2001 From: thomaspetry Date: Thu, 8 Oct 2015 13:48:01 +0300 Subject: [PATCH 08/10] testCommit --- .../unioulu/tol/sqatlab/gameoflife/Grid.java | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index 3bae895..f4ab081 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -1,15 +1,47 @@ package org.unioulu.tol.sqatlab.gameoflife; public class Grid { - public int[][] grid = new int[9][9]; + Cell zelle = new Cell(); + public Cell[][] grid = new Cell[9][9]; public void start() { for(int i = 0; i < grid.length; i++) { for(int j = 0; j < grid.length; j++) { - Cell(i,j); + zelle.cell(i,j); } } } + + public void neighboursetting(int x, int y){ + int temp = 0; + if (grid[x-1][y-1].getState() == "*") { + temp++; + } + if (grid[x][y-1].getState() == "*") { + temp++; + } + if (grid[x+1][y-1].getState() == "*") { + temp++; + } + if (grid[x-1][y].getState() == "*") { + temp++; + } + if (grid[x+1][y].getState() == "*") { + temp++; + } + if (grid[x-1][y+1].getState() == "*") { + temp++; + } + if (grid[x][y+1].getState() == "*") { + temp++; + } + if (grid[x+1][y+1].getState() == "*") { + temp++; + } + grid[x][y].setNeighbour(temp); + + + } public void update() { From a6f13b0dd57c7859ad38ebdd229d4e488b1a2512 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 8 Oct 2015 13:54:26 +0300 Subject: [PATCH 09/10] besouro automatic message --- .besouro/2015100812403882/actions.txt | 5 +++++ src/org/unioulu/tol/sqatlab/gameoflife/Grid.java | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.besouro/2015100812403882/actions.txt b/.besouro/2015100812403882/actions.txt index e2b293e..6d8247a 100644 --- a/.besouro/2015100812403882/actions.txt +++ b/.besouro/2015100812403882/actions.txt @@ -51,3 +51,8 @@ RefactoringAction 1444300624112 Grid.java RENAME neighboursetting=>void neighbou RefactoringAction 1444300654146 Grid.java RENAME neighboursetting()=>void neighboursetting(int) METHOD RefactoringAction 1444300655654 Grid.java RENAME neighboursetting(int)=>void neighboursetting(int, int) METHOD EditAction 1444301270142 Cell.java 656 5 10 0 +CompilationAction 1444301270403 TestCell.java +CompilationAction 1444301270403 TestCell.java +RefactoringAction 1444301655026 Grid.java RENAME zelle=>Cell cel FIELD +RefactoringAction 1444301656034 Grid.java RENAME cel=>Cell cell FIELD +EditAction 1444301666836 Grid.java 857 3 11 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index f4ab081..645afd5 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -1,13 +1,13 @@ package org.unioulu.tol.sqatlab.gameoflife; public class Grid { - Cell zelle = new Cell(); + Cell cell = new Cell(); public Cell[][] grid = new Cell[9][9]; public void start() { for(int i = 0; i < grid.length; i++) { for(int j = 0; j < grid.length; j++) { - zelle.cell(i,j); + cell.cell(i,j); } } } From 9b9f929cc63b1857748d600aade79c7cdb48fa00 Mon Sep 17 00:00:00 2001 From: thomaspetry Date: Thu, 8 Oct 2015 13:54:46 +0300 Subject: [PATCH 10/10] neighboursetting --- src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java index 66dad34..e0f3b52 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java @@ -10,9 +10,7 @@ public class TestCell { @Test public void testLiveCellWithNoNeighborDies() { - Cell cell = new Cell("Alive"); - cell.update(); - assertEquals("Dead", cell.getState()); + } }