User Profile

Collapse

Profile Sidebar

Collapse
BaronB
BaronB
Last Activity: Mar 3 '08, 01:41 AM
Joined: Dec 3 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • BaronB
    replied to HashSet confusion
    in Java
    Er, ok, I guess I am. Well I suppose my problem is that I don't know how I could keep track of the moves that eventually lead to the solution when actually trying all the possible moves. I don't suppose a nudge in the right direction would be out of the question / morally unacceptable?

    Thanks
    See more | Go to post

    Leave a comment:


  • BaronB
    replied to HashSet confusion
    in Java
    First, let me say thank you for the response :) Though those aren't actually my problems.

    From the starting code for the assignment, trays will be encoded into 2-d arrays of integers, where each value at a row/col will be either -1 for empty or the id of an instance of Block in the tray. Mea culpa for not mentioning that in the OP. There's already a possibleMoves method too, which returns a SortedSet of instances of the class Move....
    See more | Go to post

    Leave a comment:


  • BaronB
    started a topic HashSet confusion
    in Java

    HashSet confusion

    Hi all, I'm writing a program to solve sliding block puzzles like these and while I think I've more or less figured it out, I have one problem before I start coding it.

    During execution, the program will take the possible moves that can be performed on an board position, perform them, and add the new boards to a HashSet if they aren't in there already until a board that satisifies a solution is found. The trouble is I've never used...
    See more | Go to post
No activity results to display
Show More
Working...