Thread: N-Puzzle Help!
View Single Post
  #10 (permalink)  
Old 04-28-2009, 07:12 PM
evan42781 evan42781 is offline
Member
 
Join Date: Apr 2009
Posts: 11
Rep Power: 0
evan42781 is on a distinguished road
Default
ok so i put my own board in manually instead of random and i found out that it was trying to find -1 as the blank spot instead of 0. thats is fixed now. However its now throwing a classCast exception at the end of A* method right before it back tracks?? error is below.

Code:
java.lang.ClassCastException was unhandled
  Message="ImplementBoardActions@2b89eaa"
  Source="vjslib"
  StackTrace:
       at java.util.Arrays.__sort(Array array, Int32 from, Int32 to, IComparer comparer)
       at java.util.Arrays.sort(Object[] arr, Int32 fromIx, Int32 toIx, Comparator comp)
       at java.util.Arrays.sort(Object[] arr)
       at SolverAStar.AStar(Int32[][] StartingBoard) in C:\Users\Evan\Documents\Visual Studio 2005\Projects\8_puzzle\8_puzzle\Solver.jsl:line 132
       at N_Puzzle.main(String[] args) in C:\Users\Evan\Documents\Visual Studio 2005\Projects\8_puzzle\8_puzzle\N-Puzzle.jsl:line 41
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
Reply With Quote