Skip to content
Permalink
Browse files
Make a four-room dungeon.
Gotta try out all of those directions!

Map:

/---------------------------------\
|               |                 |
|               |                 |
|               -                 |
|                                 |
|                                 |
|               -                 |
|               |                 |
|0              |1                |
|-----|    |----+------|    |-----|
|               |                 |
|               |                 |
|               |                 |
|               |                 |
|               |                 |
|               |                 |
|               |                 |
|2              |3                |
\---------------+------|    |-----|
                |                 |
                |                 |
                |                 |
                |      Exit       |
                |                 |
                |                 |
                |                 |
                |4                |
                +-----------------/
  • Loading branch information
steveklabnik committed Sep 6, 2014
1 parent 4dbc1dd commit 7d3cf7178be073b75085bd06d818de9e7dd68b15
Showing 1 changed file with 29 additions and 3 deletions.
@@ -43,27 +43,53 @@ impl Room {
fn main() {
let rooms = vec![
Room {
description: "You find yourself in a room. There is a door to the south.".to_string(),
description: "You find yourself in a room. There is a door to the south and a door to the east.".to_string(),
exits: vec![
Exit {
direction: South,
target: 2,
},
Exit {
direction: East,
target: 1,
},
],
},
Room {
description: "You find yourself in a room. There is a door to the north and a door to the south.".to_string(),
description: "You find yourself in a room. There is a door to the west and a door to the south.".to_string(),
exits: vec![
Exit {
direction: West,
target: 0,
},
Exit {
direction: South,
target: 2,
target: 3,
},
],
},
Room {
description: "You find yourself in a room. There is a door to the north.".to_string(),
exits: vec![
Exit {
direction: North,
target: 0,
},
],
},
Room {
description: "You find yourself in a room. There is a door to the north and a door to the south.".to_string(),
exits: vec![
Exit {
direction: North,
target: 1,
},
Exit {
direction: South,
target: 4,
},
],
},
Room {
description: "Dungeon exit".to_string(),
exits: vec![],

0 comments on commit 7d3cf71

Please sign in to comment.