Click here to Skip to main content
15,889,595 members
Home / Discussions / C#
   

C#

 
GeneralRe: My thoughts on C# Pin
BillWoodruff1-Jun-19 17:40
professionalBillWoodruff1-Jun-19 17:40 
GeneralRe: My thoughts on C# Pin
Brian_TheLion1-Jun-19 18:02
Brian_TheLion1-Jun-19 18:02 
GeneralRe: My thoughts on C# Pin
OriginalGriff1-Jun-19 20:16
mveOriginalGriff1-Jun-19 20:16 
GeneralRe: My thoughts on C# Pin
Brian_TheLion1-Jun-19 20:37
Brian_TheLion1-Jun-19 20:37 
GeneralRe: My thoughts on C# Pin
phil.o1-Jun-19 22:02
professionalphil.o1-Jun-19 22:02 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 16:16
Brian_TheLion2-Jun-19 16:16 
GeneralRe: My thoughts on C# Pin
OriginalGriff1-Jun-19 22:47
mveOriginalGriff1-Jun-19 22:47 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 15:45
Brian_TheLion2-Jun-19 15:45 
Thanks Griff.

I like the way you use examples.

The reason why I was thinking of having an inventory class was to keep track of objects that the player picked up, like the trousers that keeps a wallet and other things. If the player drops an object then the object is removed from the player and appears in the current room.
There would be a limit of either the number of objects the player can carry or the maximum weight the player could carry which would be handled by the inventory class. If the player picks up gold then the inventory class would increase the players score. Some objects can't be picked up such as a building, water, etc so the inventory class would need to check if the object is moveable. Also the inventory class checks to see if the player is already has the item to be picked up.

What I wanted to ask you if this is a good reason to have an inventory class? It tends to separate the code away from the main() class code.

Brian
GeneralRe: My thoughts on C# Pin
Dave Kreskowiak2-Jun-19 6:10
mveDave Kreskowiak2-Jun-19 6:10 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 15:32
Brian_TheLion2-Jun-19 15:32 
GeneralRe: My thoughts on C# Pin
Brian_TheLion3-Jun-19 12:49
Brian_TheLion3-Jun-19 12:49 
GeneralRe: My thoughts on C# Pin
BillWoodruff2-Jun-19 20:07
professionalBillWoodruff2-Jun-19 20:07 
GeneralRe: My thoughts on C# Pin
Brian_TheLion3-Jun-19 12:40
Brian_TheLion3-Jun-19 12:40 
GeneralRe: My thoughts on C# Pin
Richard MacCutchan1-Jun-19 21:46
mveRichard MacCutchan1-Jun-19 21:46 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 0:15
Brian_TheLion2-Jun-19 0:15 
GeneralRe: My thoughts on C# Pin
Mycroft Holmes2-Jun-19 13:36
professionalMycroft Holmes2-Jun-19 13:36 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 15:22
Brian_TheLion2-Jun-19 15:22 
GeneralRe: My thoughts on C# Pin
Mycroft Holmes2-Jun-19 15:58
professionalMycroft Holmes2-Jun-19 15:58 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 16:50
Brian_TheLion2-Jun-19 16:50 
GeneralRe: My thoughts on C# Pin
jsc423-Jun-19 23:18
professionaljsc423-Jun-19 23:18 
GeneralRe: My thoughts on C# Pin
Brian_TheLion4-Jun-19 17:48
Brian_TheLion4-Jun-19 17:48 
GeneralRe: My thoughts on C# Pin
Brian_TheLion3-Jun-19 12:32
Brian_TheLion3-Jun-19 12:32 
GeneralRe: My thoughts on C# Pin
Richard MacCutchan2-Jun-19 21:58
mveRichard MacCutchan2-Jun-19 21:58 
GeneralRe: My thoughts on C# Pin
Brian_TheLion3-Jun-19 12:44
Brian_TheLion3-Jun-19 12:44 
GeneralRe: My thoughts on C# Pin
Richard MacCutchan3-Jun-19 20:56
mveRichard MacCutchan3-Jun-19 20:56 

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.