[jboss-svn-commits] JBL Code SVN: r16137 - labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/sudoku.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Oct 29 10:35:06 EDT 2007


Author: pete.bennett at jboss.com
Date: 2007-10-29 10:35:06 -0400 (Mon, 29 Oct 2007)
New Revision: 16137

Modified:
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/sudoku/sudokuValidator.drl
Log:
Checked differences between my local copy and the repository and they were all just down to Java 5 usage so updating the respoitory with my local copy.

Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/sudoku/sudokuValidator.drl
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/sudoku/sudokuValidator.drl	2007-10-29 10:45:01 UTC (rev 16136)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/sudoku/sudokuValidator.drl	2007-10-29 14:35:06 UTC (rev 16137)
@@ -6,7 +6,7 @@
 global java.util.List issues;
 
 /**
- * This rule package defines a set of rules that can be used to validate whether a valid Suoku solution
+ * This rule package defines a set of rules that can be used to validate whether a valid Sudoku solution
  * has been produced or not. It expects to have objects of type PossibleCellValue and ResolvedCellValue
  * inserted into the working memory and will then check that only a single ResolvedCellValue exists
  * in a 9x9 Sudoku grid for each row, column and 3x3 zone.
@@ -20,6 +20,14 @@
 
 // TODO: I would like to have a rule that checks there are exactly SudokuGridModel.NUM_ROWS x SudokuGridModel.NUM_COLS = 81
 //       ResolvedCellValues in the working memory
+/**
+rule "There should be exactly 81 ResolvedCellValues in working memory"
+	when
+	    # count number of ResovledCellValues in working memory and check it is exactly 81
+	then
+		issues.add("There are not exactly 81 ResolvedCellValues in working memory");
+end
+**/
 
 /**
  * Checks for any remaining PossibleCellValues in the working memory, such values can be an artifact




More information about the jboss-svn-commits mailing list