portlandcodeschool / jsi-gamelib

JSI Game Library
1 stars 5 forks source link

Please support longer names #13

Open ErinCall opened 9 years ago

ErinCall commented 9 years ago

I'm making a really big game, and I need to be able to use longer names. I want to use A-Z and then start using AA, BB, etc. Maybe the library should support up to 3 character names. That would support up to 17,576 rooms and would probably keep me happy for a while.

For my game.json (below), the library currently outputs this:

+---------+---------+---------+---------+
|         |         |         |         |
|    HH         II         JJJ         K    |
|         |         |         |         |
+---   ---+---------+---------+---------+
|         |                              
|    GGG    |                              
|         |                              
+---   ---+---------+---------+          
|         |         |         |          
|    DD    |    E         FF    |          
|         |         |         |          
+---   ---+---   ---+---------+          
|         |         |         |          
|    A         BB         CCC    |          
|         |         |         |          
+---------+---------+---------+          

game.json:

{
  "rooms": [
    {
      "name": "A",
      "north": "DD",
      "east": "BB",
      "south": null,
      "west": null
    },
    {
      "name": "BB",
      "north": "E",
      "east": "CCC",
      "south": null,
      "west": "A",
      "entrance": "south"
    },
    {
      "name": "CCC",
      "north": null,
      "east": null,
      "south": null,
      "west": "BB"
    },
    {
      "name": "DD",
      "north": "GGG",
      "east": null,
      "south": "A",
      "west": null
    },
    {
      "name": "E",
      "north": null,
      "east": "FF",
      "south": "BB",
      "west": null
    },
    {
      "name": "FF",
      "north": null,
      "east": null,
      "south": null,
      "west": "E"
    },
    {
      "name": "GGG",
      "north": "HH",
      "east": null,
      "south": "DD",
      "west": null
    },
    {
      "name": "HH",
      "north": null,
      "east": "II",
      "south": "GGG",
      "west": null
    },
    {
      "name": "II",
      "north": null,
      "east": "JJJ",
      "south": null,
      "west": "HH"
    },
    {
      "name": "JJJ",
      "north": null,
      "east": "K",
      "south": null,
      "west": "II"
    },
    {
      "name": "K",
      "north": null,
      "east": null,
      "south": null,
      "west": "JJJ",
      "treasure": true
    }
  ]
}