-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame_room2.js
42 lines (40 loc) · 1.73 KB
/
game_room2.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
'use strict';
class Room2 extends React.Component {
render() {
if (this.props.inventory.includes("Key")) {
return(
<div>
You are in a hallway. At the end of the hallway is an <Exit_Door
verb={this.props.verb}
inventory={this.props.inventory}
item={this.props.item}
changeMessage={this.props.changeMessage}
changeRoom={this.props.changeRoom}
interactions={this.props.interactions}
interactStates={this.props.interactStates}
/>.
</div>
)
} else {
return(
<div>
You are in a hallway. There is a <Key
verb={this.props.verb}
inventory={this.props.inventory}
changeMessage={this.props.changeMessage}
interactions={this.props.interactions}
interactStates={this.props.interactStates}
/> on the ground. At the end of the hallway is an <Exit_Door
verb={this.props.verb}
item={this.props.item}
inventory={this.props.inventory}
changeMessage={this.props.changeMessage}
changeRoom={this.props.changeRoom}
interactions={this.props.interactions}
interactStates={this.props.interactStates}
/>.
</div>
)
}
}
}