Click here to Skip to main content
15,903,030 members
Home / Discussions / C#
   

C#

 
AnswerRe: DataProtection API Pin
Kornfeld Eliyahu Peter2-Jun-19 22:35
professionalKornfeld Eliyahu Peter2-Jun-19 22:35 
AnswerRe: DataProtection API Pin
Eddy Vluggen2-Jun-19 22:50
professionalEddy Vluggen2-Jun-19 22:50 
GeneralMy thoughts on C# Pin
Brian_TheLion1-Jun-19 15:43
Brian_TheLion1-Jun-19 15:43 
GeneralRe: My thoughts on C# Pin
Dave Kreskowiak1-Jun-19 16:06
mveDave Kreskowiak1-Jun-19 16:06 
GeneralRe: My thoughts on C# Pin
Brian_TheLion1-Jun-19 18:16
Brian_TheLion1-Jun-19 18:16 
GeneralRe: My thoughts on C# Pin
Luc Pattyn2-Jun-19 3:38
sitebuilderLuc Pattyn2-Jun-19 3:38 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 15:07
Brian_TheLion2-Jun-19 15:07 
GeneralRe: My thoughts on C# Pin
Luc Pattyn2-Jun-19 15:41
sitebuilderLuc Pattyn2-Jun-19 15:41 
No!

GetDrop is not a noun, it is two verbs, it cannot possibly be a candidate for a class.

There is no main() class in my world; besides, class names use TitleCase and no parentheses.

If Slippers can be gotten, they need a Get() method.
If Keys can be gotten, they need a Get() method.

Where are the slippers? where are the keys? does the adventurer know? No. Do all the rooms know? No. The slippers and the keys know where they are, it is information that pertains to them, and to nothing elxe.

There should be an Inventory object (or even one per Adventurer), and everything inside such Inventory should derive from InventoryItem, which can hold common properties and/or common methods of gettable objects. An item's location would be an obvious property of InventoryItem; and maybe your complex test belongs there, so you don't have to repeat such test code in every single inventory item's code.

Inside InventoryItem class, you probably will have good use for a static List<inventoryitem> where all items get stored, so you can search them. That is how a Room can figure what is present at any point in time.

This was my last technical contribution to this topic. From all you write (and all you apparently don't pick up reading our answers) it is very clear to me you are still missing the basics of OOP. If you don't work on this (shut down your computer and go read one or two OOP books now!) you are wasting your and our time. Books tend to present their subject in a structured way, dealing with way more aspects than you are thinking of right now; random questions in a forum can't match that, they become useful after you acquired the foundation, not before.

Good luck. Over and out.

Java | [Coffee]
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 16:09
Brian_TheLion2-Jun-19 16:09 
GeneralRe: My thoughts on C# Pin
Dave Kreskowiak2-Jun-19 5:27
mveDave Kreskowiak2-Jun-19 5:27 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 14:25
Brian_TheLion2-Jun-19 14:25 
GeneralRe: My thoughts on C# Pin
Dave Kreskowiak2-Jun-19 15:42
mveDave Kreskowiak2-Jun-19 15:42 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 16:30
Brian_TheLion2-Jun-19 16:30 
GeneralRe: My thoughts on C# Pin
Dave Kreskowiak2-Jun-19 17:26
mveDave Kreskowiak2-Jun-19 17:26 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 17:46
Brian_TheLion2-Jun-19 17:46 
GeneralRe: My thoughts on C# Pin
Dave Kreskowiak3-Jun-19 2:37
mveDave Kreskowiak3-Jun-19 2:37 
GeneralRe: My thoughts on C# Pin
#realJSOP2-Jun-19 4:29
professional#realJSOP2-Jun-19 4:29 
GeneralRe: My thoughts on C# Pin
Dave Kreskowiak2-Jun-19 5:44
mveDave Kreskowiak2-Jun-19 5:44 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 15:56
Brian_TheLion2-Jun-19 15:56 
GeneralRe: My thoughts on C# Pin
#realJSOP3-Jun-19 0:15
professional#realJSOP3-Jun-19 0:15 
GeneralRe: My thoughts on C# Pin
Dave Kreskowiak3-Jun-19 2:37
mveDave Kreskowiak3-Jun-19 2:37 
GeneralRe: My thoughts on C# Pin
Brian_TheLion3-Jun-19 12:22
Brian_TheLion3-Jun-19 12:22 
GeneralRe: My thoughts on C# Pin
Brian_TheLion2-Jun-19 15:17
Brian_TheLion2-Jun-19 15:17 
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 

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.