From 5e9c6395dc8bb86e989cc009b9247bdab92a0833 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 8 Oct 2015 12:39:45 +0300 Subject: [PATCH 1/9] besouro automatic message --- .besouro/20151008123919173/actions.txt | 2 ++ .besouro/20151008123919173/besouroEpisodes.txt | 0 .besouro/20151008123919173/disagreements.txt | 0 .besouro/20151008123919173/randomHeuristicEpisodes.txt | 0 .besouro/20151008123919173/userComments.txt | 0 .besouro/20151008123919173/zorroEpisodes.txt | 0 .../unioulu/tol/sqatlab/gameoflife/test/TestCell.java | 9 ++++++++- 7 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .besouro/20151008123919173/actions.txt create mode 100644 .besouro/20151008123919173/besouroEpisodes.txt create mode 100644 .besouro/20151008123919173/disagreements.txt create mode 100644 .besouro/20151008123919173/randomHeuristicEpisodes.txt create mode 100644 .besouro/20151008123919173/userComments.txt create mode 100644 .besouro/20151008123919173/zorroEpisodes.txt diff --git a/.besouro/20151008123919173/actions.txt b/.besouro/20151008123919173/actions.txt new file mode 100644 index 0000000..e7fd862 --- /dev/null +++ b/.besouro/20151008123919173/actions.txt @@ -0,0 +1,2 @@ +FileOpenedAction 1444297159625 Cell.java 68 1 3 0 +EditAction 1444297185630 TestCell.java 399 1 0 0 diff --git a/.besouro/20151008123919173/besouroEpisodes.txt b/.besouro/20151008123919173/besouroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20151008123919173/disagreements.txt b/.besouro/20151008123919173/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20151008123919173/randomHeuristicEpisodes.txt b/.besouro/20151008123919173/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20151008123919173/userComments.txt b/.besouro/20151008123919173/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20151008123919173/zorroEpisodes.txt b/.besouro/20151008123919173/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java index d8de09e..7140aef 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java @@ -3,11 +3,18 @@ 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() { + public void testLiveCellsWithNoNeighboursDies() { + Cell cell= new Cell("Alive"); + cell.update(0); + assertEquals.("Dead", cell.getState()) + + fail("Not yet implemented"); } From 99322dfa1bb698ffc76460c32f0078992d925475 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 8 Oct 2015 12:39:45 +0300 Subject: [PATCH 2/9] besouro automatic message --- .besouro/20151008123919173/actions.txt | 1 + src/org/unioulu/tol/sqatlab/gameoflife/Cell.java | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/.besouro/20151008123919173/actions.txt b/.besouro/20151008123919173/actions.txt index e7fd862..c514051 100644 --- a/.besouro/20151008123919173/actions.txt +++ b/.besouro/20151008123919173/actions.txt @@ -1,2 +1,3 @@ FileOpenedAction 1444297159625 Cell.java 68 1 3 0 EditAction 1444297185630 TestCell.java 399 1 0 0 +EditAction 1444297185771 Cell.java 236 1 3 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java index b66e9c8..03f0dc4 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java @@ -1,5 +1,14 @@ package org.unioulu.tol.sqatlab.gameoflife; public class Cell { + public int collum; + public int row; + public int neighbour; + + public Cell( int col, int row ) { + this.collum = collum; + this.row = row; + neighbour = 0; + } } From 040cf49d814f36c43dffde4508abe453848b6d8f Mon Sep 17 00:00:00 2001 From: nickhallen Date: Thu, 8 Oct 2015 12:40:24 +0300 Subject: [PATCH 3/9] testcommit --- .besouro/20151008123919173/actions.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.besouro/20151008123919173/actions.txt b/.besouro/20151008123919173/actions.txt index c514051..fd2dd02 100644 --- a/.besouro/20151008123919173/actions.txt +++ b/.besouro/20151008123919173/actions.txt @@ -1,3 +1,11 @@ FileOpenedAction 1444297159625 Cell.java 68 1 3 0 EditAction 1444297185630 TestCell.java 399 1 0 0 EditAction 1444297185771 Cell.java 236 1 3 0 +CompilationAction 1444297187050 TestCell.java +CompilationAction 1444297187050 TestCell.java +CompilationAction 1444297187050 TestCell.java +CompilationAction 1444297187050 TestCell.java +CompilationAction 1444297187050 TestCell.java +CompilationAction 1444297187050 TestCell.java +CompilationAction 1444297187050 TestCell.java +CompilationAction 1444297187050 TestCell.java From 2389d3fd8f3459d6bed3e31d002b6cc0d2ceef3a Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 8 Oct 2015 13:20:42 +0300 Subject: [PATCH 4/9] besouro automatic message --- .besouro/20151008123919173/actions.txt | 18 ++++++++++++++++++ .../tol/sqatlab/gameoflife/test/TestGrid.java | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.besouro/20151008123919173/actions.txt b/.besouro/20151008123919173/actions.txt index fd2dd02..7782fe3 100644 --- a/.besouro/20151008123919173/actions.txt +++ b/.besouro/20151008123919173/actions.txt @@ -9,3 +9,21 @@ CompilationAction 1444297187050 TestCell.java CompilationAction 1444297187050 TestCell.java CompilationAction 1444297187050 TestCell.java CompilationAction 1444297187050 TestCell.java +RefactoringAction 1444297304003 Cell.java RENAME Cell(int, int)=>Cell(int, int, int) METHOD +RefactoringAction 1444298116397 Cell.java RENAME collum=>int x FIELD +RefactoringAction 1444298120516 Cell.java RENAME row=>int y FIELD +RefactoringAction 1444298126210 Cell.java RENAME Cell(int, int, int)=>Cell() METHOD +RefactoringAction 1444298127239 Cell.java RENAME Cell()=>Cell(int, int, int) METHOD +RefactoringAction 1444298133417 Cell.java RENAME Cell(int, int, int)=>Cell(int) METHOD +RefactoringAction 1444298134961 Cell.java RENAME Cell(int)=>Cell(int, int, int) METHOD +RefactoringAction 1444298142683 Cell.java RENAME Cell(int, int, int)=>Cell(int, int) METHOD +RefactoringAction 1444298529938 Cell.java ADD import java.util.Random IMPORT +RefactoringAction 1444299031841 Grid.java ADD int FIELD +RefactoringAction 1444299193839 Grid.java REMOVE grid FIELD +RefactoringAction 1444299261793 Grid.java ADD int FIELD +RefactoringAction 1444299263852 Grid.java REMOVE grid FIELD +RefactoringAction 1444299265911 Grid.java ADD int FIELD +RefactoringAction 1444299427216 Grid.java ADD void start FIELD +RefactoringAction 1444299428245 Grid.java RENAME start=>void start() METHOD +RefactoringAction 1444299581297 Cell.java ADD String state FIELD +EditAction 1444299642106 TestGrid.java 172 1 1 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..6c1c282 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 1c7bc8c735ecef03230e2357de689a0aeb1f01f1 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 8 Oct 2015 13:20:42 +0300 Subject: [PATCH 5/9] besouro automatic message --- .besouro/20151008123919173/actions.txt | 1 + src/org/unioulu/tol/sqatlab/gameoflife/Grid.java | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.besouro/20151008123919173/actions.txt b/.besouro/20151008123919173/actions.txt index 7782fe3..788c092 100644 --- a/.besouro/20151008123919173/actions.txt +++ b/.besouro/20151008123919173/actions.txt @@ -27,3 +27,4 @@ RefactoringAction 1444299427216 Grid.java ADD void start FIELD RefactoringAction 1444299428245 Grid.java RENAME start=>void start() METHOD RefactoringAction 1444299581297 Cell.java ADD String state FIELD EditAction 1444299642106 TestGrid.java 172 1 1 0 +EditAction 1444299642184 Grid.java 296 1 1 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index 19dbf0b..c49a16d 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -1,5 +1,15 @@ package org.unioulu.tol.sqatlab.gameoflife; public class Grid { - + 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++) { + + } + + } + + } From ed3a374e7f8167946506ce3eb4bf36dc05d60d3d Mon Sep 17 00:00:00 2001 From: nickhallen Date: Thu, 8 Oct 2015 13:20:51 +0300 Subject: [PATCH 6/9] testcommit --- .../unioulu/tol/sqatlab/gameoflife/Cell.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java index 03f0dc4..c2a33dc 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java @@ -1,14 +1,27 @@ package org.unioulu.tol.sqatlab.gameoflife; +import java.util.Random; + public class Cell { - public int collum; - public int row; + public int x; + public int y; public int neighbour; + public String state; - public Cell( int col, int row ) { - this.collum = collum; - this.row = row; + 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 = "*"; + } } + + } From 052faf508dc7b813018f7219f00291edac0a904f Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 8 Oct 2015 13:33:00 +0300 Subject: [PATCH 7/9] besouro automatic message --- .besouro/20151008123919173/actions.txt | 23 +++++++++++++++++++ .../unioulu/tol/sqatlab/gameoflife/Grid.java | 8 +++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.besouro/20151008123919173/actions.txt b/.besouro/20151008123919173/actions.txt index 788c092..af070d5 100644 --- a/.besouro/20151008123919173/actions.txt +++ b/.besouro/20151008123919173/actions.txt @@ -28,3 +28,26 @@ RefactoringAction 1444299428245 Grid.java RENAME start=>void start() METHOD RefactoringAction 1444299581297 Cell.java ADD String state FIELD EditAction 1444299642106 TestGrid.java 172 1 1 0 EditAction 1444299642184 Grid.java 296 1 1 0 +CompilationAction 1444299642387 TestCell.java +CompilationAction 1444299642403 TestCell.java +CompilationAction 1444299642403 TestCell.java +CompilationAction 1444299642403 TestCell.java +CompilationAction 1444299642403 TestCell.java +CompilationAction 1444299642403 TestCell.java +CompilationAction 1444299642403 TestCell.java +CompilationAction 1444299642403 TestCell.java +RefactoringAction 1444299781586 Grid.java ADD import org.univoulu.tol.sqatlab.sudoku.SudokuVerifier IMPORT +RefactoringAction 1444299800634 Grid.java RENAME sudoku=>Cell su FIELD +RefactoringAction 1444299801663 Grid.java RENAME su=>Cell s FIELD +RefactoringAction 1444299803208 Grid.java REMOVE s FIELD +RefactoringAction 1444299804237 Grid.java ADD Cell cell FIELD +RefactoringAction 1444299836810 Cell.java RENAME Cell(int, int)=>void ell(int, int) METHOD +RefactoringAction 1444299837840 Cell.java RENAME ell(int, int)=>void cell(int, int) METHOD +RefactoringAction 1444299893953 Grid.java ADD import org.tol.sqatlab.sudoku.SudokuVerifier IMPORT +RefactoringAction 1444299897557 Grid.java RENAME import org.tol.sqatlab.sudoku.SudokuVerifier=>import org.univoulu.tol.sqatlab.sudoku.SudokuVerifier IMPORT +RefactoringAction 1444300155472 Grid.java RENAME cell=>Cell zelle FIELD +RefactoringAction 1444300269758 Cell.java ADD int getNeighbour() METHOD +RefactoringAction 1444300269758 Cell.java ADD void setNeighbour(int) METHOD +RefactoringAction 1444300269758 Cell.java ADD String getState() METHOD +RefactoringAction 1444300269758 Cell.java ADD void setState(String) METHOD +EditAction 1444300380159 Grid.java 403 1 1 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index c49a16d..36b131a 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -1,12 +1,16 @@ package org.unioulu.tol.sqatlab.gameoflife; +import org.univoulu.tol.sqatlab.sudoku.SudokuVerifier; + public class Grid { - 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++) { - + zelle.cell (i,j); } } From 833b29c39386089548618829412c5cfa56124f73 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 8 Oct 2015 13:33:00 +0300 Subject: [PATCH 8/9] besouro automatic message --- .besouro/20151008123919173/actions.txt | 1 + .../unioulu/tol/sqatlab/gameoflife/Cell.java | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.besouro/20151008123919173/actions.txt b/.besouro/20151008123919173/actions.txt index af070d5..27c5f5e 100644 --- a/.besouro/20151008123919173/actions.txt +++ b/.besouro/20151008123919173/actions.txt @@ -51,3 +51,4 @@ RefactoringAction 1444300269758 Cell.java ADD void setNeighbour(int) METHOD RefactoringAction 1444300269758 Cell.java ADD String getState() METHOD RefactoringAction 1444300269758 Cell.java ADD void setState(String) METHOD EditAction 1444300380159 Grid.java 403 1 1 0 +EditAction 1444300380237 Cell.java 713 5 10 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java index c2a33dc..fae87e9 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; From 7c86629c026539dd4b9263a830f258caaf2ecb3a Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 8 Oct 2015 13:46:18 +0300 Subject: [PATCH 9/9] besouro automatic message --- .besouro/20151008123919173/actions.txt | 16 +++++++++ .../unioulu/tol/sqatlab/gameoflife/Grid.java | 35 +++++++++++++++++-- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/.besouro/20151008123919173/actions.txt b/.besouro/20151008123919173/actions.txt index 27c5f5e..6a449e6 100644 --- a/.besouro/20151008123919173/actions.txt +++ b/.besouro/20151008123919173/actions.txt @@ -52,3 +52,19 @@ RefactoringAction 1444300269758 Cell.java ADD String getState() METHOD RefactoringAction 1444300269758 Cell.java ADD void setState(String) METHOD EditAction 1444300380159 Grid.java 403 1 1 0 EditAction 1444300380237 Cell.java 713 5 10 0 +CompilationAction 1444300380424 Grid.java +CompilationAction 1444300380424 TestCell.java +CompilationAction 1444300380424 TestCell.java +CompilationAction 1444300380424 TestCell.java +CompilationAction 1444300380424 TestCell.java +CompilationAction 1444300380424 TestCell.java +CompilationAction 1444300380424 TestCell.java +RefactoringAction 1444300435102 Grid.java ADD import org.univoulu.tol.sqatlab.sudoku.SudokuVerifier IMPORT +RefactoringAction 1444300850849 Grid.java ADD void neighbours FIELD +RefactoringAction 1444300853423 Grid.java RENAME neighbours=>void neighbourssetti FIELD +RefactoringAction 1444300854967 Grid.java RENAME neighbourssetti=>void neighbourssetting FIELD +RefactoringAction 1444300859600 Grid.java RENAME neighbourssetting=>void neighboursetting FIELD +RefactoringAction 1444300869897 Grid.java RENAME neighboursetting=> null +RefactoringAction 1444300870926 Grid.java RENAME neighboursetting(int)=>void neighboursetting(int, int) METHOD +CompilationAction 1444301174128 Grid.java +EditAction 1444301178715 Cell.java 713 5 10 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index 36b131a..d72cf01 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -12,8 +12,37 @@ public void start() { for(int j = 0; j < grid.length; 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); + +} + +} +