File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed 
aima-core/src/main/java/aima/core/logic/planning Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,6 @@ public State result(List<ActionSchema> actions) {
7171        return  state ;
7272    }
7373
74- 
7574    /** 
7675     * Checks if the action is applicable in a state. 
7776     * <p> 
@@ -81,16 +80,13 @@ public State result(List<ActionSchema> actions) {
8180     * @return a boolean stating if the action is applicable. 
8281     */ 
8382    public  boolean  isApplicable (ActionSchema  action ) {
84-         boolean  result  = true ;
8583        for  (Literal  literal  : action .getPrecondition ()) {
8684            if  (literal .isPositiveLiteral ()
8785                    ? !fluents .contains (literal )
88-                     : fluents .contains (literal .getComplementaryLiteral ())) {
89-                 result  = false ;
90-                 break ;
91-             }
86+                     : fluents .contains (literal .getComplementaryLiteral ()))
87+                 return  false ;
9288        }
93-         return  result ;
89+         return  true ;
9490    }
9591
9692    public  List <Literal > getFluents () {
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments