How to implement connected rooms?

后端 未结 7 1218
难免孤独
难免孤独 2021-02-04 22:27

This may be a duplicate question as I don\'t know to phrase the search query. I\'m creating a Zork-like text based game in Java where the character moves to different rooms whic

7条回答
  •  情歌与酒
    2021-02-04 23:09

    The first thing that came to mind when I saw the question was a making a Graph data structure, but reading these other comments, a Map is probably a lot better. Graphs are too complicated.

提交回复
热议问题