Back in college, I wrote a short Java command-line utility that would solve the classic slider puzzle (8 tiles and an empty space). I've recently started learning Objective C and Cocoa and would like to port over my code. This is how it starts in Java:
Just beginning the port, I've already run into many hurdles...
1) what's the equivalent or alternative to the Java TreeMap in Obj C?
2) what's the equivalent or alternative to the Java LinkedList in Obj C? (I think I can use an NSMutableArray for that, right?)
3) Can you declare constants in a header file in Obj C? If not, where?
Any guidance or help would be appreciated
Code:
import java.util.TreeMap;
import java.util.LinkedList;
public class PuzzleBoard
{
private String gameState;
private final String GOAL = "123456780";
LinkedList queue;
TreeMap marked;
...
Just beginning the port, I've already run into many hurdles...
1) what's the equivalent or alternative to the Java TreeMap in Obj C?
2) what's the equivalent or alternative to the Java LinkedList in Obj C? (I think I can use an NSMutableArray for that, right?)
3) Can you declare constants in a header file in Obj C? If not, where?
Any guidance or help would be appreciated