Compare commits

..

No commits in common. "e34b9ab57cdfcca4ab456e793da893275979dc7e" and "6de3e286ed50aee60a0b182fbcfd33963866f9cb" have entirely different histories.

6 changed files with 34 additions and 56 deletions

View file

@ -0,0 +1,14 @@
/*
* This Java source file was generated by the Gradle 'init' task.
*/
package sudoku;
public class App {
public String getGreeting() {
return "Hello World!";
}
public static void main(String[] args) {
System.out.println(new App().getGreeting());
}
}

View file

@ -1,32 +0,0 @@
package sudoku;
public class Solver implements SudokuSolver {
private int[][] board;
public Solver() {
board = new int[9][9];
}
public void setBoard(int[][] board) {
this.board = board;
}
public int[][] getBoard() {
return board;
}
public boolean solve() {
}
public Boolean isSolved() {
}
private boolean solve(int row, int col) {
}
public boolean legal(int row, int col, int nbr) {
}
public String toString() {
}
}

View file

@ -1,7 +0,0 @@
package sudoku;
public class SolverMain {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}

View file

@ -1,6 +1,9 @@
package sudoku;
public interface SudokuSolver{
// Work in progress
/**
* Set sudoku board, numbers 1-9 are fixed values, 0 is unsolved.
*/
@ -13,14 +16,12 @@ public interface SudokuSolver {
/**
* Solve soduko
*
* @return true if solution could be found
*/
boolean solve();
/**
* Check if digit is legal on the current board
*
* @param row
* @param col
* @param nbr

View file

@ -0,0 +1,14 @@
/*
* This Java source file was generated by the Gradle 'init' task.
*/
package sudoku;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class AppTest {
@Test void appHasAGreeting() {
App classUnderTest = new App();
assertNotNull(classUnderTest.getGreeting(), "app should have a greeting");
}
}

View file

@ -1,12 +0,0 @@
package sudoku;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class SolverTest {
@Test void boardTest() {
Solver solver = new Solver();
solver.solve();
assertTrue(solver.isSolved());
}
}