Click here to Skip to main content
14,358,347 members
   

C#

 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218425-Apr-19 11:36
memberMember 1412218425-Apr-19 11:36 
AnswerRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
OriginalGriff25-Apr-19 7:17
protectorOriginalGriff25-Apr-19 7:17 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218425-Apr-19 11:44
memberMember 1412218425-Apr-19 11:44 
AnswerRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
V.25-Apr-19 20:02
professionalV.25-Apr-19 20:02 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218425-Apr-19 22:16
memberMember 1412218425-Apr-19 22:16 
AnswerRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Ron Nicholson26-Apr-19 6:13
professionalRon Nicholson26-Apr-19 6:13 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218426-Apr-19 22:43
memberMember 1412218426-Apr-19 22:43 
AnswerRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
BillWoodruff29-Apr-19 9:23
mveBillWoodruff29-Apr-19 9:23 
I would define "doors" as a Class with state

open, closed, locked, unlocked, visible, invisible

with access permissions:

can close, can open ... set by functions in the main game engine that evaluate current game/player state

In the context of the Room Class, you could have any number of doors.

I would keep a data structure that maps doors to the room they connect to.

There's a lot to think about: should there be a collection of all Doors; should Doors have references to both rooms they connect ?

Have fun !
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot

GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218429-Apr-19 11:40
memberMember 1412218429-Apr-19 11:40 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
BillWoodruff29-Apr-19 23:43
mveBillWoodruff29-Apr-19 23:43 
QuestionHow to configure azure-pipeline.yml for asp.net core 2.2 ? Pin
Bastien Vandamme22-Apr-19 18:45
memberBastien Vandamme22-Apr-19 18:45 
AnswerRe: How to configure azure-pipeline.yml for asp.net core 2.2 ? Pin
Gerry Schmitz22-Apr-19 19:11
mveGerry Schmitz22-Apr-19 19:11 
GeneralRe: How to configure azure-pipeline.yml for asp.net core 2.2 ? Pin
Bastien Vandamme22-Apr-19 19:20
memberBastien Vandamme22-Apr-19 19:20 
QuestionRe: How to configure azure-pipeline.yml for asp.net core 2.2 ? Pin
Richard MacCutchan22-Apr-19 22:08
protectorRichard MacCutchan22-Apr-19 22:08 
QuestionC# A few questions for my learning journey. Pin
Member 1417655620-Apr-19 23:20
memberMember 1417655620-Apr-19 23:20 
AnswerRe: C# A few questions for my learning journey. Pin
Gerry Schmitz21-Apr-19 4:17
mveGerry Schmitz21-Apr-19 4:17 
GeneralRe: C# A few questions for my learning journey. Pin
Member 1417655621-Apr-19 7:02
memberMember 1417655621-Apr-19 7:02 
GeneralRe: C# A few questions for my learning journey. Pin
Gerry Schmitz21-Apr-19 7:18
mveGerry Schmitz21-Apr-19 7:18 
AnswerRe: C# A few questions for my learning journey. Pin
BillWoodruff23-Apr-19 22:33
mveBillWoodruff23-Apr-19 22:33 
GeneralRe: C# A few questions for my learning journey. Pin
Luc Pattyn24-Apr-19 6:36
professionalLuc Pattyn24-Apr-19 6:36 
QuestionExtracting regex from string Pin
ormonds20-Apr-19 20:45
memberormonds20-Apr-19 20:45 
GeneralRe: Extracting regex from string Pin
Richard MacCutchan20-Apr-19 23:14
protectorRichard MacCutchan20-Apr-19 23:14 
AnswerRe: Extracting regex from string Pin
Eddy Vluggen21-Apr-19 1:37
mveEddy Vluggen21-Apr-19 1:37 
AnswerRe: Extracting regex from string Pin
Gerry Schmitz21-Apr-19 4:07
mveGerry Schmitz21-Apr-19 4:07 
AnswerRe: Extracting regex from string Pin
#realJSOP21-Apr-19 6:12
mve#realJSOP21-Apr-19 6:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.