|
♫Sani Sani Disco♫
|
 |
« Reply #795 on: June 21, 2012, 07:45:08 am » |
|
Booleans
Motherfucking Booleans
Booleans are useless in this case, there are 3 teams. assign a numerical value to the team variable then dubm
|
|
|
|
|
Logged
|
I don't like it.  Oh, well, you might as well pack up and stop now, because he doesn't like it Asdf64: "ultros turned me on" - sani 2013
|
|
|
|
Orpheon
|
 |
« Reply #796 on: June 21, 2012, 07:46:15 am » |
|
Booleans
Motherfucking Booleans
Booleans are useless in this case, there are 3 teams. assign a numerical value to the team variable then dubm Yeah, of course. Thing is, not everyone agrees that making a team variable is the smartest thing in the first place.
|
|
|
|
|
Logged
|
Your mind is software. Program it. Your body is a shell. Change it. Death is a disease. Cure it. Extinction is approaching. Fight it.
|
|
|
|
♫Sani Sani Disco♫
|
 |
« Reply #797 on: June 21, 2012, 07:55:07 am » |
|
Booleans
Motherfucking Booleans
Booleans are useless in this case, there are 3 teams. assign a numerical value to the team variable then dubm Yeah, of course. Thing is, not everyone agrees that making a team variable is the smartest thing in the first place. It gives you flexibility and ease with developing and modding. Not to say people are going to actually use it, but whatever.
|
|
|
|
|
Logged
|
I don't like it.  Oh, well, you might as well pack up and stop now, because he doesn't like it Asdf64: "ultros turned me on" - sani 2013
|
|
|
|
Orpheon
|
 |
« Reply #798 on: June 21, 2012, 08:40:31 am » |
|
Booleans
Motherfucking Booleans
Booleans are useless in this case, there are 3 teams. assign a numerical value to the team variable then dubm Yeah, of course. Thing is, not everyone agrees that making a team variable is the smartest thing in the first place. It gives you flexibility and ease with developing and modding. Not to say people are going to actually use it, but whatever. So do different classes for different teams. That is a requirement, not an argument.
|
|
|
|
« Last Edit: June 21, 2012, 08:40:48 am by Orpheon »
|
Logged
|
Your mind is software. Program it. Your body is a shell. Change it. Death is a disease. Cure it. Extinction is approaching. Fight it.
|
|
|
|
♫Sani Sani Disco♫
|
 |
« Reply #799 on: June 21, 2012, 11:27:33 am » |
|
You're gonna have to help me out with that one, because that genuinely makes no sense at all.
|
|
|
|
|
Logged
|
I don't like it.  Oh, well, you might as well pack up and stop now, because he doesn't like it Asdf64: "ultros turned me on" - sani 2013
|
|
|
|
Orpheon
|
 |
« Reply #800 on: June 21, 2012, 11:53:33 am » |
|
You're gonna have to help me out with that one, because that genuinely makes no sense at all.
A variable on everything is one option. The other option is to make a general "Shot" class (f.ex.), and use some two separate "Shot_red" and "Shot_blue" classes that have separate code. Both of them feature flexibility.
|
|
|
|
|
Logged
|
Your mind is software. Program it. Your body is a shell. Change it. Death is a disease. Cure it. Extinction is approaching. Fight it.
|
|
|
|
♫Sani Sani Disco♫
|
 |
« Reply #801 on: June 21, 2012, 11:56:37 am » |
|
I don't really see the point in doing that when you could easily alter how they function by using the variable that assigns their team. And we would only need a boolean if we're using the shot_red and shot_blue argument here.
|
|
|
|
|
Logged
|
I don't like it.  Oh, well, you might as well pack up and stop now, because he doesn't like it Asdf64: "ultros turned me on" - sani 2013
|
|
|
|
NAGN
|
 |
« Reply #802 on: June 21, 2012, 04:58:29 pm » |
|
it'd be good design to assign a .team variable to everything, and assign the numerical number to a constant.
It wouldn't make any sense to essentially hard code the two teams when behavior works identically
|
|
|
|
|
Logged
|
  [im
|
|
|
|
Orpheon
|
 |
« Reply #803 on: June 22, 2012, 06:14:35 am » |
|
Alright. Then what I decided and already implemented was correct.
|
|
|
|
|
Logged
|
Your mind is software. Program it. Your body is a shell. Change it. Death is a disease. Cure it. Extinction is approaching. Fight it.
|
|
|
Glock Topic
Newbie
Offline
Posts: 12
|
 |
« Reply #804 on: June 22, 2012, 07:45:32 pm » |
|
team = True  or False  or None 
|
|
|
|
« Last Edit: June 22, 2012, 07:47:40 pm by Glock Topic »
|
Logged
|
|
|
|
|
♫Sani Sani Disco♫
|
 |
« Reply #805 on: June 22, 2012, 10:56:31 pm » |
|
team = True  or False  or None  put this man on the dev team
|
|
|
|
|
Logged
|
I don't like it.  Oh, well, you might as well pack up and stop now, because he doesn't like it Asdf64: "ultros turned me on" - sani 2013
|
|
|
|
Phantom Brave
|
 |
« Reply #806 on: June 22, 2012, 11:41:32 pm » |
|
can bools really contain null because if so then this guy is a genius
|
|
|
|
|
Logged
|
 Linkin Park lyrics here
|
|
|
Glock Topic
Newbie
Offline
Posts: 12
|
 |
« Reply #807 on: June 23, 2012, 03:38:55 am » |
|
can bools really contain null because if so then this guy is a genius
bools are immutable
|
|
|
|
« Last Edit: June 23, 2012, 03:46:44 am by Glock Topic »
|
Logged
|
|
|
|
|
Phantom Brave
|
 |
« Reply #808 on: June 23, 2012, 03:59:34 am » |
|
no sir that is not how data types work
|
|
|
|
|
Logged
|
 Linkin Park lyrics here
|
|
|
|
nightcracker
|
 |
« Reply #809 on: June 23, 2012, 04:06:46 am » |
|
no sir that is not how data types work
Yes sir, in Python bools, int's, None, str's among others are, in fact, immutable.
|
|
|
|
|
Logged
|
|
|
|
|