Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,6 @@ import java.util.NoSuchElementException

object SudokuIO {

def printRow( row: ReductionSet): String = {
def printSubRow( subRowNo: Int): String = {
val printItems = List(1,2,3).map( x => x + subRowNo * 3)
(for (elem <- row)
yield {
(printItems.map (item => if ((elem & printItems.toSet).contains(item)) item.toString else " ")).mkString("")
}).mkString("| ", " | ", " |")
}
(for (subRow <- 0 until 3) yield printSubRow(subRow)).mkString("\n")
}

def printRowShort( row: ReductionSet): String = {
(for (elem <- row)
yield {
if (elem.size == 1) elem.head.toString else " "
}).mkString("|","|","|")

}

private def sudokuCellRepresentation(content: CellContent): String = {
content.toList match {
case Nil => "x"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,6 @@ import java.util.NoSuchElementException

object SudokuIO {

def printRow( row: ReductionSet): String = {
def printSubRow( subRowNo: Int): String = {
val printItems = List(1,2,3).map( x => x + subRowNo * 3)
(for (elem <- row)
yield {
(printItems.map (item => if ((elem & printItems.toSet).contains(item)) item.toString else " ")).mkString("")
}).mkString("| ", " | ", " |")
}
(for (subRow <- 0 until 3) yield printSubRow(subRow)).mkString("\n")
}

def printRowShort( row: ReductionSet): String = {
(for (elem <- row)
yield {
if (elem.size == 1) elem.head.toString else " "
}).mkString("|","|","|")

}

private def sudokuCellRepresentation(content: CellContent): String = {
content.toList match {
case Nil => "x"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ import java.util.NoSuchElementException

object SudokuIO:

def printRow( row: ReductionSet): String =
def printSubRow( subRowNo: Int): String =
val printItems = List(1,2,3).map( x => x + subRowNo * 3)
(for elem <- row
yield {
(printItems.map (item => if (elem & printItems.toSet).contains(item) then item.toString else " ")).mkString("")
}).mkString("| ", " | ", " |")
(for subRow <- 0 until 3 yield printSubRow(subRow)).mkString("\n")

def printRowShort( row: ReductionSet): String =
(for elem <- row
yield {
if elem.size == 1 then elem.head.toString else " "
}).mkString("|","|","|")


private def sudokuCellRepresentation(content: CellContent): String =
content.toList match
case Nil => "x"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ import java.util.NoSuchElementException

object SudokuIO:

def printRow( row: ReductionSet): String =
def printSubRow( subRowNo: Int): String =
val printItems = List(1,2,3).map( x => x + subRowNo * 3)
(for elem <- row
yield {
(printItems.map (item => if (elem & printItems.toSet).contains(item) then item.toString else " ")).mkString("")
}).mkString("| ", " | ", " |")
(for subRow <- 0 until 3 yield printSubRow(subRow)).mkString("\n")

def printRowShort( row: ReductionSet): String =
(for (elem <- row)
yield {
if elem.size == 1 then elem.head.toString else " "
}).mkString("|","|","|")


private def sudokuCellRepresentation(content: CellContent): String =
content.toList match
case Nil => "x"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ import java.util.NoSuchElementException

object SudokuIO:

def printRow( row: ReductionSet): String =
def printSubRow( subRowNo: Int): String =
val printItems = List(1,2,3).map( x => x + subRowNo * 3)
(for elem <- row
yield {
(printItems.map (item => if (elem & printItems.toSet).contains(item) then item.toString else " ")).mkString("")
}).mkString("| ", " | ", " |")
(for subRow <- 0 until 3 yield printSubRow(subRow)).mkString("\n")

def printRowShort( row: ReductionSet): String =
(for (elem <- row)
yield {
if elem.size == 1 then elem.head.toString else " "
}).mkString("|","|","|")


private def sudokuCellRepresentation(content: CellContent): String =
content.toList match
case Nil => "x"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ import java.util.NoSuchElementException

object SudokuIO:

def printRow( row: ReductionSet): String =
def printSubRow( subRowNo: Int): String =
val printItems = List(1,2,3).map( x => x + subRowNo * 3)
(for elem <- row
yield {
(printItems.map (item => if (elem & printItems.toSet).contains(item) then item.toString else " ")).mkString("")
}).mkString("| ", " | ", " |")
(for subRow <- 0 until 3 yield printSubRow(subRow)).mkString("\n")

def printRowShort( row: ReductionSet): String =
(for (elem <- row)
yield {
if elem.size == 1 then elem.head.toString else " "
}).mkString("|","|","|")


private def sudokuCellRepresentation(content: CellContent): String =
content.toList match
case Nil => "x"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ import java.util.NoSuchElementException

object SudokuIO:

def printRow( row: ReductionSet): String =
def printSubRow( subRowNo: Int): String =
val printItems = List(1,2,3).map( x => x + subRowNo * 3)
(for elem <- row
yield {
(printItems.map (item => if (elem & printItems.toSet).contains(item) then item.toString else " ")).mkString("")
}).mkString("| ", " | ", " |")
(for subRow <- 0 until 3 yield printSubRow(subRow)).mkString("\n")

def printRowShort( row: ReductionSet): String =
(for (elem <- row)
yield {
if elem.size == 1 then elem.head.toString else " "
}).mkString("|","|","|")


private def sudokuCellRepresentation(content: CellContent): String =
content.toList match
case Nil => "x"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ import java.util.NoSuchElementException

object SudokuIO:

def printRow( row: ReductionSet): String =
def printSubRow( subRowNo: Int): String =
val printItems = List(1,2,3).map( x => x + subRowNo * 3)
(for elem <- row
yield {
(printItems.map (item => if (elem & printItems.toSet).contains(item) then item.toString else " ")).mkString("")
}).mkString("| ", " | ", " |")
(for subRow <- 0 until 3 yield printSubRow(subRow)).mkString("\n")

def printRowShort( row: ReductionSet): String =
(for (elem <- row)
yield {
if elem.size == 1 then elem.head.toString else " "
}).mkString("|","|","|")


private def sudokuCellRepresentation(content: CellContent): String =
content.toList match
case Nil => "x"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ import java.util.NoSuchElementException

object SudokuIO:

def printRow( row: ReductionSet): String =
def printSubRow( subRowNo: Int): String =
val printItems = List(1,2,3).map( x => x + subRowNo * 3)
(for elem <- row
yield {
(printItems.map (item => if (elem & printItems.toSet).contains(item) then item.toString else " ")).mkString("")
}).mkString("| ", " | ", " |")
(for subRow <- 0 until 3 yield printSubRow(subRow)).mkString("\n")

def printRowShort( row: ReductionSet): String =
(for (elem <- row)
yield {
if elem.size == 1 then elem.head.toString else " "
}).mkString("|","|","|")


private def sudokuCellRepresentation(content: CellContent): String =
content.toList match
case Nil => "x"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ import java.util.NoSuchElementException

object SudokuIO:

def printRow( row: ReductionSet): String =
def printSubRow( subRowNo: Int): String =
val printItems = List(1,2,3).map( x => x + subRowNo * 3)
(for elem <- row
yield {
(printItems.map (item => if (elem & printItems.toSet).contains(item) then item.toString else " ")).mkString("")
}).mkString("| ", " | ", " |")
(for subRow <- 0 until 3 yield printSubRow(subRow)).mkString("\n")

def printRowShort( row: ReductionSet): String =
(for (elem <- row)
yield {
if elem.size == 1 then elem.head.toString else " "
}).mkString("|","|","|")


private def sudokuCellRepresentation(content: CellContent): String =
content.toList match
case Nil => "x"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ import java.util.NoSuchElementException

object SudokuIO:

def printRow( row: ReductionSet): String =
def printSubRow( subRowNo: Int): String =
val printItems = List(1,2,3).map( x => x + subRowNo * 3)
(for elem <- row
yield {
(printItems.map (item => if (elem & printItems.toSet).contains(item) then item.toString else " ")).mkString("")
}).mkString("| ", " | ", " |")
(for subRow <- 0 until 3 yield printSubRow(subRow)).mkString("\n")

def printRowShort( row: ReductionSet): String =
(for (elem <- row)
yield {
if elem.size == 1 then elem.head.toString else " "
}).mkString("|","|","|")


private def sudokuCellRepresentation(content: CellContent): String =
content.toList match
case Nil => "x"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ import java.util.NoSuchElementException

object SudokuIO:

def printRow( row: ReductionSet): String =
def printSubRow( subRowNo: Int): String =
val printItems = List(1,2,3).map( x => x + subRowNo * 3)
(for elem <- row
yield {
(printItems.map (item => if (elem & printItems.toSet).contains(item) then item.toString else " ")).mkString("")
}).mkString("| ", " | ", " |")
(for subRow <- 0 until 3 yield printSubRow(subRow)).mkString("\n")

def printRowShort( row: ReductionSet): String =
(for (elem <- row)
yield {
if elem.size == 1 then elem.head.toString else " "
}).mkString("|","|","|")


private def sudokuCellRepresentation(content: CellContent): String =
content.toList match
case Nil => "x"
Expand Down