Off Topic > Off Topic
Programming Megathread
<< < (236/241) > >>
Ipquarx:

--- Quote from: Waru on July 03, 2017, 01:25:43 PM ---
--- End quote ---
Well first I'd recommend making that enum static.

Second, the answer to your question depends on how different those weapon types are. If there are a lot of differences between the functionality of the weapon types, then it would be a good idea to take advantage of inheritance/polymorphism and make them their own classes.
Mr.Blocko:
So, can anybody describe the pros and cons of Kotlin vs Java, because what the forget is this:

--- Code: ---package hello
fun main(args: Array<String>) {
   println("Hello World!")
}
--- End code ---
I've been seeing it everywhere, it's even supported by android studio and eclipse, and apparently it was a real big deal when it was announced for android studio at I/o this year. Should I take a look at it or stick with good ol' Java?
AndroFox:

--- Quote from: Waru on July 03, 2017, 01:25:43 PM ---

--- End quote ---
make an abstract class for each weapon type and have each weapon implementation inherit from one of those classes


--- Quote from: Mr.Blocko on July 03, 2017, 05:41:25 PM ---So, can anybody describe the pros and cons of Kotlin vs Java, because what the forget is this:

--- Code: ---package hello
fun main(args: Array<String>) {
   println("Hello World!")
}
--- End code ---
I've been seeing it everywhere, it's even supported by android studio and eclipse, and apparently it was a real big deal when it was announced for android studio at I/o this year. Should I take a look at it or stick with good ol' Java?

--- End quote ---
I'd stick with what's well known, reliable and extensively supported
Waru:

--- Quote from: AndroFox on July 03, 2017, 06:10:30 PM ---make an abstract class for each weapon type and have each weapon implementation inherit from one of those classes

--- End quote ---

what benefits does this have tho and why is this better than the other solutions?
Metario:

--- Quote from: Waru on July 03, 2017, 09:25:40 PM ---what benefits does this have tho and why is this better than the other solutions?

--- End quote ---
makes it easier to maintain and if you want to roll out a change to all weapons you can just change the template and it'll update for all
Navigation
Message Index
Next page
Previous page

Go to full version