Search found 6 matches

by noelle
Tue 29 Jun, 2021, 3:30 am
Forum: Public Chat
Topic: Coding Workshop
Replies: 10
Views: 3382

Re: Coding Workshop

I've been muddling this over in my head for a week, and I think this is the solution I've come up with: Each player object has a dictionary of slots in which clothing items can appear; each slot is a deque (from collections, as above). A very basic object might look something like this: player = {&q...
by noelle
Mon 21 Jun, 2021, 6:13 am
Forum: Public Chat
Topic: Coding Workshop
Replies: 10
Views: 3382

Re: Coding Workshop

I'm sorry it took me so long to respond to this. -_- Right now it is Very Late and it would be a mistake for me to do any real coding, but for now I can direct you to Python's collections module (which is built-in; you can just import it without having to deal with pip), which provides structures li...
by noelle
Tue 08 Jun, 2021, 6:20 pm
Forum: Public Chat
Topic: Coding Workshop
Replies: 10
Views: 3382

Re: Coding Workshop

Ah, I get you. Hm. I think in that circumstance I'd just implement it as a list, and walk the list to see what's ultimately visible. So in your example, you'd have ["sports bra", "dress", "bolero jacket"] "sports bra" has ["upper back", "chest&q...
by noelle
Tue 08 Jun, 2021, 2:48 am
Forum: Public Chat
Topic: Coding Workshop
Replies: 10
Views: 3382

Re: Coding Workshop

Ultimately, I think you're going to need a reference table regardless unless you're very verbose with your variable names. As for putting on/taking off clothes, I was assuming that any given item of clothing would be associated with an integer that determined what parts of the body it covered, with ...
by noelle
Tue 08 Jun, 2021, 12:33 am
Forum: Public Chat
Topic: Coding Workshop
Replies: 10
Views: 3382

Re: Coding Workshop

This is a purely idle thought, but you might find an advantage in encoding this into binary, where each location gets a place in the number. So, for example: Forward scalp: (place) 1 Rear scalp: 2 Left side scalp: 3 Right side scalp: 4 Left ear: 5 Right ear: 6 Forehead: 7 Left eye: 8 Right eye: 9 Le...