001    /*
002     * Created on Sep 12, 2004
003     *
004     */
005    package aima.search.eightpuzzle;
006    
007    import aima.search.framework.GoalTest;
008    
009    /**
010     * @author Ravi Mohan
011     * 
012     */
013    
014    public class EightPuzzleGoalTest implements GoalTest {
015            EightPuzzleBoard goal = new EightPuzzleBoard(new int[] { 0, 1, 2, 3, 4, 5,
016                            6, 7, 8 });
017    
018            public boolean isGoalState(Object state) {
019                    EightPuzzleBoard board = (EightPuzzleBoard) state;
020                    return board.equals(goal);
021            }
022    
023    }