Click here to Skip to main content
15,888,231 members
Home / Discussions / C#
   

C#

 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218425-Apr-19 10:36
Member 1412218425-Apr-19 10:36 
AnswerRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
OriginalGriff25-Apr-19 6:17
mveOriginalGriff25-Apr-19 6:17 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218425-Apr-19 10:44
Member 1412218425-Apr-19 10:44 
AnswerRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
V.25-Apr-19 19:02
professionalV.25-Apr-19 19:02 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218425-Apr-19 21:16
Member 1412218425-Apr-19 21:16 
AnswerRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Ron Nicholson26-Apr-19 5:13
professionalRon Nicholson26-Apr-19 5:13 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218426-Apr-19 21:43
Member 1412218426-Apr-19 21:43 
AnswerRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
BillWoodruff29-Apr-19 8:23
professionalBillWoodruff29-Apr-19 8: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 10:40
Member 1412218429-Apr-19 10:40 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
BillWoodruff29-Apr-19 22:43
professionalBillWoodruff29-Apr-19 22:43 
QuestionHow to configure azure-pipeline.yml for asp.net core 2.2 ? Pin
Bastien Vandamme22-Apr-19 17:45
Bastien Vandamme22-Apr-19 17:45 
AnswerRe: How to configure azure-pipeline.yml for asp.net core 2.2 ? Pin
Gerry Schmitz22-Apr-19 18:11
mveGerry Schmitz22-Apr-19 18:11 
GeneralRe: How to configure azure-pipeline.yml for asp.net core 2.2 ? Pin
Bastien Vandamme22-Apr-19 18:20
Bastien Vandamme22-Apr-19 18:20 
QuestionRe: How to configure azure-pipeline.yml for asp.net core 2.2 ? Pin
Richard MacCutchan22-Apr-19 21:08
mveRichard MacCutchan22-Apr-19 21:08 
QuestionC# A few questions for my learning journey. Pin
Member 1417655620-Apr-19 22:20
Member 1417655620-Apr-19 22:20 
AnswerRe: C# A few questions for my learning journey. Pin
Gerry Schmitz21-Apr-19 3:17
mveGerry Schmitz21-Apr-19 3:17 
GeneralRe: C# A few questions for my learning journey. Pin
Member 1417655621-Apr-19 6:02
Member 1417655621-Apr-19 6:02 
GeneralRe: C# A few questions for my learning journey. Pin
Gerry Schmitz21-Apr-19 6:18
mveGerry Schmitz21-Apr-19 6:18 
AnswerRe: C# A few questions for my learning journey. Pin
BillWoodruff23-Apr-19 21:33
professionalBillWoodruff23-Apr-19 21:33 
GeneralRe: C# A few questions for my learning journey. Pin
Luc Pattyn24-Apr-19 5:36
sitebuilderLuc Pattyn24-Apr-19 5:36 
QuestionExtracting regex from string Pin
ormonds20-Apr-19 19:45
ormonds20-Apr-19 19:45 
GeneralRe: Extracting regex from string Pin
Richard MacCutchan20-Apr-19 22:14
mveRichard MacCutchan20-Apr-19 22:14 
AnswerRe: Extracting regex from string Pin
Eddy Vluggen21-Apr-19 0:37
professionalEddy Vluggen21-Apr-19 0:37 
AnswerRe: Extracting regex from string Pin
Gerry Schmitz21-Apr-19 3:07
mveGerry Schmitz21-Apr-19 3:07 
AnswerRe: Extracting regex from string Pin
#realJSOP21-Apr-19 5:12
mve#realJSOP21-Apr-19 5: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.