[jboss-svn-commits] JBL Code SVN: r26278 - labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Apr 27 09:19:01 EDT 2009
Author: laune
Date: 2009-04-27 09:19:00 -0400 (Mon, 27 Apr 2009)
New Revision: 26278
Modified:
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-agendagroup.drl
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-ruleflow.drl
Log:
simplify patterns
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-agendagroup.drl
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-agendagroup.drl 2009-04-27 12:00:51 UTC (rev 26277)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-agendagroup.drl 2009-04-27 13:19:00 UTC (rev 26278)
@@ -15,7 +15,7 @@
agenda-group "register neighbor"
when
CellGrid( $numberOfColumns : numberOfColumns )
- $cell: Cell( $row : row > 0, $col : col < ( $numberOfColumns - 1 ) )
+ $cell: Cell( $row : row, $col : col )
$northEast : Cell( row == ($row - 1), col == ( $col + 1 ) )
then
insert( new Neighbor( $cell, $northEast ) );
@@ -25,7 +25,7 @@
rule "register north"
agenda-group "register neighbor"
when
- $cell: Cell( $row : row > 0, $col : col )
+ $cell: Cell( $row : row, $col : col )
$north : Cell( row == ($row - 1), col == $col )
then
insert( new Neighbor( $cell, $north ) );
@@ -35,7 +35,7 @@
rule "register north west"
agenda-group "register neighbor"
when
- $cell: Cell( $row : row > 0, $col : col > 0 )
+ $cell: Cell( $row : row, $col : col )
$northWest : Cell( row == ($row - 1), col == ( $col - 1 ) )
then
insert( new Neighbor( $cell, $northWest ) );
@@ -45,7 +45,7 @@
rule "register west"
agenda-group "register neighbor"
when
- $cell: Cell( $row : row, $col : col > 0 )
+ $cell: Cell( $row : row, $col : col )
$west : Cell( row == $row, col == ( $col - 1 ) )
then
insert( new Neighbor( $cell, $west ) );
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-ruleflow.drl
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-ruleflow.drl 2009-04-27 12:00:51 UTC (rev 26277)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-ruleflow.drl 2009-04-27 13:19:00 UTC (rev 26278)
@@ -14,8 +14,7 @@
rule "register north east"
ruleflow-group "register neighbor"
when
- CellGrid( $numberOfColumns : numberOfColumns )
- $cell: Cell( $row : row > 0, $col : col < ( $numberOfColumns - 1 ) )
+ $cell: Cell( $row : row, $col : col )
$northEast : Cell( row == ($row - 1), col == ( $col + 1 ) )
then
insert( new Neighbor( $cell, $northEast ) );
@@ -25,7 +24,7 @@
rule "register north"
ruleflow-group "register neighbor"
when
- $cell: Cell( $row : row > 0, $col : col )
+ $cell: Cell( $row : row, $col : col )
$north : Cell( row == ($row - 1), col == $col )
then
insert( new Neighbor( $cell, $north ) );
@@ -35,7 +34,7 @@
rule "register north west"
ruleflow-group "register neighbor"
when
- $cell: Cell( $row : row > 0, $col : col > 0 )
+ $cell: Cell( $row : row, $col : col )
$northWest : Cell( row == ($row - 1), col == ( $col - 1 ) )
then
insert( new Neighbor( $cell, $northWest ) );
@@ -45,7 +44,7 @@
rule "register west"
ruleflow-group "register neighbor"
when
- $cell: Cell( $row : row >= 0, $col : col > 0 )
+ $cell: Cell( $row : row, $col : col )
$west : Cell( row == $row, col == ( $col - 1 ) )
then
insert( new Neighbor( $cell, $west ) );
More information about the jboss-svn-commits
mailing list