I'm trying to make a game similar to Risk where each territory on the map is an object of a class I made, Territory. In order to create the game map I would like each Territory object to be linked to the other territories that would be adjacent on the game board. Is there a way in Java to create some kind of data structure that can store all the objects and with links to their "neighbors"? Or is there a way to have objects store references to other objects like you could with pointers in C?
问问题
102 次