Hello Members,
I would like to find out if anyone is nice enough to help me remove the ArrayList class from this code completely and replace it with something else that is not either of the following:
{
int i = (int)(Math.random() * (double)(float)tiles.size());
Tile tile = (Tile)tiles.remove(i);
return tile;
}
}
public void addTile(Tile tile)
{
tiles.add(tile);
}
public boolean isEmpty()
{
return tiles.size() == 0;
}
ArrayList tiles;
}
03-09-2005, 04:50 AM
sjalle
1 Attachment(s)
I have this.
This is a 'list' class that is a linked list with que, stack, hashtable and arraylist
functionalities. It also includes its own exception and listener class.
I have supplied a driver class so you can check how it can be used.
03-09-2005, 06:36 AM
Danger Phoenix
I just read the restrictions again, and I am not meant to use LinkedLists :s