Timeline for Survival Game - Create Your Wolf
Current License: CC BY-SA 3.0
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2020 at 9:04 | history | edited | CommunityBot | Commonmark migration | |
| Apr 9, 2014 at 21:37 | comment | added | Zaq | @Rusher I'm not sure exactly in which order the classloader will load the classes, but obviously my code won't do much if it doesn't run before other wolves' classloaders. I'm surprised that it does nothing when put at the beginning of the list. What does it output when you println(Attack.ROCK) after populating the board? | |
| Apr 9, 2014 at 20:55 | comment | added | Rainbolt | @Zaq Last night, I tried putting your class first in the Class[] classes list, and it didn't affect the results. Just now, I tried removing every other Animal in the animals package, added yours back, and then added the rest, and it didn't make a difference. What other special accommodations your Wolf need? I'm using JDK 8.0 in NetBeans 7.4. Also, thanks for changing your letter back to 'W'. | |
| Apr 9, 2014 at 20:45 | comment | added | Sahar Rabinoviz | @Zaq I was just clarifying that CamoWolf is not a valid wolf. | |
| Apr 9, 2014 at 20:43 | comment | added | Zaq | @DisplayName101 I changed my code to super('W') before you made that comment. | |
| Apr 9, 2014 at 20:42 | comment | added | Zaq | @Rusher I think that the problem with my code not working is that the classloader runs in order that the classes are used in code. For example, in new FooWolf(); new Mirror(); new BazWolf(), BazWolf will be affected, while FooWolf will not, presumably. I didn't expect this to be a problem with my code. | |
| Apr 9, 2014 at 20:40 | comment | added | Sahar Rabinoviz | @Zaq CamoWolf is a not considered a valid wolf because it uses super('S') | |
| Apr 9, 2014 at 20:37 | history | edited | Zaq | CC BY-SA 3.0 | deleted 35 characters in body |
| Apr 9, 2014 at 20:30 | history | edited | Zaq | CC BY-SA 3.0 | added 20 characters in body |
| Apr 9, 2014 at 20:19 | comment | added | Zaq | @plannapus the camo wolf specifically uses super('S') as its strategy, so I think that this is not against any rules, but since you insist I'll go ahead and change it to a 'W' anyway. | |
| Apr 9, 2014 at 8:16 | comment | added | plannapus | public Mirror() { super('M'); } <- I think this is specifically disallowed in the rules. | |
| Apr 9, 2014 at 5:48 | comment | added | Ilya Gazman | It will not work. The field is only a copy of actual class filed. Which you cannot modify. I think the fact that Enums are final in Java should give you a hint ;) | |
| Apr 9, 2014 at 3:37 | comment | added | Rainbolt | I want this to work as you intended it to, but I just don't know enough about reflection and the NetBeans compiler to understand why your wolf is just losing and the rest of the competition seems is unaffected. I have a hunch that the final static enum that you modify is replaced by the compiler (since it is a constant), and your changes just go unnoticed. Any thoughts, since you are obviously more familiar with it? | |
| Apr 9, 2014 at 2:00 | history | edited | Zaq | CC BY-SA 3.0 | added 40 characters in body; deleted 41 characters in body |
| Apr 9, 2014 at 1:05 | history | edited | Zaq | CC BY-SA 3.0 | added 55 characters in body |
| Apr 9, 2014 at 0:54 | history | edited | Zaq | CC BY-SA 3.0 | added 12 characters in body |
| Apr 9, 2014 at 0:49 | history | answered | Zaq | CC BY-SA 3.0 |