Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Checking for an object in Array

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone, I have an array of objects with different kind of them:



And the thing is I want to establish an if conditional that executes code depending on the presence of one object or another. The objects are basically potions, until now I had only health potions so I just checked if the Array was empty or not (with the size method), but now I want to check specifically if there are any health or strenght potions.



Thanks in advance!!
 
Bartender
Posts: 2326
100
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Carlos,
I am afraid the above code is pretty bad in terms of OOPs. Not only is the indentations messed up, but there are a lot of bad design choices above. Specifically using variables without calling the getter methods.
Given that the variables are not english based terms, it's difficult to actually help you out.

Assuming that "Items" class (which you have not shared in the above code), has a type() method, you can simply make a method to check it has Health or Strength
e.g.
 
Carlos Roma
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

salvin francis wrote:Hi Carlos,
I am afraid the above code is pretty bad in terms of OOPs. Not only is the indentations messed up, but there are a lot of bad design choices above.



I know identation is a mess... Can you suggest how I can improve it in that example code I gave? Thanks a lot.
 
salvin francis
Bartender
Posts: 2326
100
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Carlos Roma wrote:I know identation is a mess... Can you suggest how I can improve it in that example code I gave...


Indentations can be easily fixed by an IDE. e.g. Eclipse does this:
However, a far more severe issue is that you are using variables directly from the class. A few suggestions:
can be
similarly can be Both if and else in your code has this line: maybe that can be removed out ?
 
Carlos Roma
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see what you mean, accesing class variables directly can compromise the security right? Also that is why I used setters and getters in the first place and I'm not taking advantage of them. About indentations, I'm using netbeans, I don't know If there is an option to rearrange everything or I'll have to check the entire code myself.

Thanks a lot for taking the time to explain it to me!
 
salvin francis
Bartender
Posts: 2326
100
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am glad it helps. I also realized that you already have an Array in your code, in that case, my method can be like this :
You do not need to convert your array to a list just to search it.
 
Sheriff
Posts: 6109
157
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a moment to look at HowToFormatCode (that's a link).  It has the keystrokes for how to format code, but also how to write code formatted and why takes important.
 
Saloon Keeper
Posts: 2658
333
Android Eclipse IDE Angular Framework MySQL Database TypeScript Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A simplification for Salvin's code would be to use Stream#anyMatch in-place of the filter/findAny/isPresent pipeline:
 
Carlos Roma
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have change my code as Salvin suggested and now I'm facing an unwanted consequence. I replaced all the direct player variables references in my combat() method, this method triggers a turn combat where the player or the enemy attacks based on a random number. The thing is, with the changes is working but the player and enemy HP are not saved after the attack. Example output:

It's your turn, you attack Laika the dog dealing 5 damage points.
Laika the dog have 23 hp left.

Select an action. If you want to attack press 'Enter':
_______________________________________________________________________
--------------------------------
-Pouch 'p'
-Try to run 'r'
-Defend 'd'
--------------------------------

It's your turn, you attack Laika the dog dealing 5 damage points.
Laika the dog have 23 hp left.

The enemy hp resets, this is the part of the code which controls that part of the combat



Can anyone tell me why the hp of player and enemy are reseting or not changing accordly? Player and Enemy objects are created in different classes, player is in the main class as follows;



Enemies are inside the methods where they are going to appear, in a class called ChapterOne, example:






 
Rancher
Posts: 92
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't see your Enemy and Player classes unless I missed something, can you post it here?
 
salvin francis
Bartender
Posts: 2326
100
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adrian is right, you have not given a standalone code (SSCCE) that runs and demonstrates your issue.
ShowSomeEffort <-- Its a link
http://sscce.org/  <-- Its a link
 
Carlos Roma
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Adrian Grabowski wrote:I can't see your Enemy and Player classes unless I missed something, can you post it here?



Edited, sorry-.

salvin francis wrote:Adrian is right, you have not given a standalone code (SSCCE) that runs and demonstrates your issue.



Sorry salvin, I knew about the rule but I wanted the code to be short. I think the problem is in the tiradaTurno method(), that's why I focused on that.
 
Marshal
Posts: 65053
247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't edit posts like that: use a new post.
 
Carlos Roma
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Enemy class:



Player class:


 
Rancher
Posts: 4183
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All your Enemies are the same.
That is they use the same data.
If you look at the Player and Enemy class you'll see that all the bits of Enemy are static, which means there's only ever one of each of those values, unlike in Player where you can create instances with their own values.

So step 1 would be to remove all the static bits from Enemy.
Yes, this will undoubtedly produce a load of errors, but that's not a bad thing.
 
Campbell Ritchie
Marshal
Posts: 65053
247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Carlos Roma wrote:. . . I know identation is a mess... Can you suggest how I can improve it in that example code I gave? Thanks a lot.

Never correct indentation; make sure to indent the code correctly as you write it. If you are not using an IDE, get a decent text editor (not MS Notepad); my favourite for Windows® is NotePad++. Set up the following options, which will all help you navigate your code:
  • syntax highlighting, if you can read the coloured text.
  • bracket matching
  • automatic indentation
  • automatic conversion: 1 tab→4 spaces
  • automatic marking of right margin at 80 spaces
  • We hear many people say they will correct their indentation later, but that isn't how it should work. Get the indentation right from the first line you write.
     
    Marshal
    Posts: 6970
    471
    Mac OS X VI Editor BSD Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Carlos Roma wrote:


    Was thinking for quite some time, but still couldn't get by looking to variable name int player1v1, what does it represent. That should be a very good indication to you, that variable name is very poor as it doesn't communicate an idea to your code reader what it supposed to represent.
     
    Sheriff
    Posts: 13555
    223
    Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    One thing that stands out: using int to represent a boolean (int tiradaturno: 0 or 1)

    I assume tirada is a java.util.Random object given that you're calling nextInt(int) on it. Because you only have two states, you can use nextBoolean() instead. That way, this code:

    can instead be more clearly written as this:

    With the above, you don't really need comments to make it clear what the mode of play is. Make the code tell the story so you don't have to with comments.
     
    Junilu Lacar
    Sheriff
    Posts: 13555
    223
    Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Alternatively, you could define an enum:

    With this, you can write:
     
    Junilu Lacar
    Sheriff
    Posts: 13555
    223
    Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    salvin francis wrote:Assuming that "Items" class (which you have not shared in the above code), has a type() method, you can simply make a method to check it has Health or Strength
    ...


    Sorry, but that code isn't very OO either. The "smell" is type as an attribute. The smell becomes stronger with a method named "hasHealthOrStrength" with the "Or" part being the main smell producer. The "or" implies a choice or conditional. Pair that with "type" as an attribute and you have a strong indication of procedural code.

    It usually helps to flip your thinking around as to who does what. In this case, I would try something like this:
       
    This way, if I add another potion, I simply have to create another class and not have to mess around with adding to an ever-growing if-then-else statement.

    The above does have a bit of a smell though in that I know to pass the negative of DOSE_AMOUNT to the Life methods called to reduce the respective attributes. But that's another post. The point here is that of sticking with the Open-Closed Principle (Extend behavior without changing existing code)

     
    Junilu Lacar
    Sheriff
    Posts: 13555
    223
    Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Regarding the smell of knowing to pass the negative of DOSE_AMOUNT to reduce an attribute, the smell is both of unclear semantics and too much intimate knowledge of the implementation of rejuvenate and fortify.

    By the way, I chose "rejuvenate" and "fortify" because they are close to the Spanish words joven (young) and fuerte (strong), which I think OP can relate to.

    I would probably try to address the smell by adding to the Life API:


    Although now, the Life methods are not very symmetrical: rejuvenate - sicken, fortify - weaken are not very good matches. I would again experiment with other names like strengthen/weaken for example. Not sure about the health part though... freshen/sicken? revitalize/sicken? heal/sicken? Maybe a different pair altogether?

    (Edit: previously, the above was "... are very good matches"; I actually meant to write "not very good matches")

    This goes to show how important the choice of names can be in making a program clear and easy to understand when you pay attention to consistent semantics.
     
    Liutauras Vilda
    Marshal
    Posts: 6970
    471
    Mac OS X VI Editor BSD Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    @OP

    Now you have at least 2 classes, where 2 of those are: Enemy and Player. Ask yourself, do they really two conceptually completely different entities? Simply by looking to those with a pure eye, I could say they are at least 95% same. Think of a design where you could eliminate such duplication.

    Another thing which I personally sense is something not quite right, that you introduce such methods (public) as setPlayerHP(). Let me guess, how your code would look like at some point:


    If I'm quite close with my guesses, I'd think that the current implementation of your Player/Enemy class(es) leads you to such procedural implementation of the game.


    Spend some time thinking if you could implement more similar to:
    Player is either Enemy (enemy) or Human player

    enemy.hitsBySword(player)

    So how Player class may look like which deals with reducing player's hp..


    Do you see how you can avoid exposing such setters which could be messed around with by anyone out of your control.
     
    Carlos Roma
    Ranch Hand
    Posts: 30
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Dave Tolls wrote:All your Enemies are the same.
    That is they use the same data.
    If you look at the Player and Enemy class you'll see that all the bits of Enemy are static, which means there's only ever one of each of those values, unlike in Player where you can create instances with their own values.

    So step 1 would be to remove all the static bits from Enemy.
    Yes, this will undoubtedly produce a load of errors, but that's not a bad thing.



    Hi Dave, thanks for pointing that out but I don't see how is that causing my problem. Things worked before I changed from the direct variable usage to the getters and setters. This is the 'before' code:



    Juanilu Lacar wrote:One thing that stands out: using int to represent a boolean (int tiradaturno: 0 or 1)  



    The code I writted has only 0-1 because I wanted it to be short, in the one I have written the only thing that changes is that the enemy attacks 3 from 4 times and you only attack one. So, tirada goes from 0 to 3, that's why I used an int, sorry for not pointing out.

    Liutauras Vilda wrote:Was thinking for quite some time, but still couldn't get by looking to variable name int player1v1, what does it represent. That should be a very good indication to you, that variable name is very poor as it doesn't communicate an idea to your code reader what it supposed to represent.



    I think the variable name is clear, it just stores the an int that represents the player level, any suggestions?

    Campbell Ritchie wrote: Never correct indentation; make sure to indent the code correctly as you write it. If you are not using an IDE, get a decent text editor (not MS Notepad); my favourite for Windows® is NotePad++. Set up the following options, which will all help you navigate your code:
    syntax highlighting, if you can read the coloured text.
    bracket matching
    automatic indentation
    automatic conversion: 1 tab→4 spaces
    automatic marking of right margin at 80 spaces
    We hear many people say they will correct their indentation later, but that isn't how it should work. Get the indentation right from the first line you write.



    Appreciate the suggestions, from now I will be writing that way. Thanks.
     
    Carlos Roma
    Ranch Hand
    Posts: 30
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Liutauras Vilda wrote:
    Do you see how you can avoid exposing such setters which could be messed around with by anyone out of your control.



    So, the thing is not exposing even the setters? You're right about the Enemy and Player classes, they should be mixed into one, they're identical, thanks.
     
    Junilu Lacar
    Sheriff
    Posts: 13555
    223
    Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Liutauras Vilda wrote:
    enemy.hitsBySword(player)

    So how Player class may look like which deals with reducing player's hp..


    This suffers from the same kind of code smells I pointed out before. A Sword is a kind of Weapon, so if you add more weapons, you'd have to add more hitByXXX() methods. Not very good.

    Again, flip the perspective:
     
    Liutauras Vilda
    Marshal
    Posts: 6970
    471
    Mac OS X VI Editor BSD Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Carlos Roma wrote:

    Liutauras Vilda wrote:Was thinking for quite some time, but still couldn't get by looking to variable name int player1v1, what does it represent. That should be a very good indication to you, that variable name is very poor as it doesn't communicate an idea to your code reader what it supposed to represent.



    I think the variable name is clear, it just stores the an int that represents the player level, any suggestions?


    Oh, it is PlayerLvL (which you wrote as Playerlvl) and not Player1v1 (I thought along the lines player 1 versus 1...). Anyway, even then! Do you see how saving 2 characters ('e' and 'e') wasted yours and mine (and possibly other readers) time because of posting, reading, clarifying, answering, so you would save what?

    Spell names in full. So there are no ambiguities.
     
    Liutauras Vilda
    Marshal
    Posts: 6970
    471
    Mac OS X VI Editor BSD Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Junilu Lacar wrote:This suffers from the same kind of code smells I pointed out before. A Sword is a kind of Weapon, so if you add more weapons, you'd have to add more hitByXXX() methods. Not very good.


    Sure, Junilu, absolutely agree. I concentrated more on how to avoid public setters, kind of incrementally move towards something slightly better. Well, your way without doubt makes much more sense. Not sure OP is there yet.
     
    Campbell Ritchie
    Marshal
    Posts: 65053
    247
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Junilu Lacar wrote:. . .

    What's wrong with...Apart from the fact that you might need the attacking variable somwhere else (and a beginner's error which I shall leave for others to identify ). That sort of code does depend on their only being two options for PlayMode.
     
    Campbell Ritchie
    Marshal
    Posts: 65053
    247
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I think there is a better way of taking turns than using numbers and == 1 or == 0.

    One suggestion:-You will probably need an additional method.
     
    Carlos Roma
    Ranch Hand
    Posts: 30
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Okey, getting everything straight now, still, any guesses about why the enemy and player hp keep staying at their initial values?

    Thanks a lot for taking the time guys, means a lot!
     
    Dave Tolls
    Rancher
    Posts: 4183
    47
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    If you were modifying the values using methods on the objects then you could simply debug the code, putting a breakpoint on the line where it changes.
    As it is, you aren't using methods to set values, so that makes tracking changes like this really difficult.

    So, after removing the static bits of the Enemy class, the next step is to make all the instance variables private.
     
    Adrian Grabowski
    Rancher
    Posts: 92
    6
    • Likes 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    this one doesn't change anything



    and this one



    is almost correct but when your parameter has the same name as your field you need to prefix your variable with "this":
    this.playerhp = playerhp;

     
    Carlos Roma
    Ranch Hand
    Posts: 30
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Adrian Grabowski wrote:this one doesn't change anything



    and this one



    is almost correct but when your parameter has the same name as your field you need to prefix your variable with "this":
    this.playerhp = playerhp;



    That's it, thank you, what a silly mistake. I totally forgot about using this on the setters.

    Anyways, if (concerning the use of the variables) according to the posts of this topic:
    - Using class variables directly isn't recommendable
    - Using the setters and getters of those class variables isn't recommendable either

    Which would be a good practice? My goal making this game is just learn about the basics and the workflow. The design proposed by Juanilu is confusing for me, but I can understand well what Liutauras said. So, writing a method on the class to manage the class variables is a more preferable option than using setters and getters and using class variables directly is the least preferable. I'm getting it right? I get that Juanilu's solution is the ideal but, certainly, I think I'm not there yet.

    Another thing I wanted to ask, the whole thing about making class variables inaccessible is done in order to protect the class attributes from being accessed by the user and alter the program. Here matters but there are any situation in which this doesn't matter? Thanks again, I appreciate a lot the help and the effort.
     
    Junilu Lacar
    Sheriff
    Posts: 13555
    223
    Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    OP wrote:Juanilu


    It's Junilu, not Juanilu.

    I suppose it is a bit confusing if you are still thinking about the solution from a procedural mindset. OO is not easy but it does help solve some problems that are inherent in many procedural designs. It's worth understanding how it works.
     
    Knute Snortum
    Sheriff
    Posts: 6109
    157
    Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Carlos Roma wrote:Using the setters and getters of those class variables isn't recommendable either


    Well, I think getters are acceptable.  Instead of setters, try setting class instance variables in a constructor.  This isn't always possible and it gets unwieldy if there are too many parameters, but it's a good practice as it starts you down the road to writing immutable objects.
     
    Junilu Lacar
    Sheriff
    Posts: 13555
    223
    Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
    • Likes 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Carlos Roma wrote:So, writing a method on the class to manage the class variables is a more preferable option than using setters and getters and using class variables directly is the least preferable.


    The principle is to design your classes so that implementation details are irrelevant to anything outside the class. Outside the class, there should only be intent.

    That is, "After a player is hit by a sword, the player's health should be less than what it was before" is the intent. From outside of the class, that looks something like this:

    The logic to reduce the player's health is hidden from the outside world, i.e., the calculation logic is encapsulated by the class that manages the health details, the Player class. You might be able to deduce what the actual calculation logic was but from the outside you shouldn't really care about it. You just want the result. This is related to the GRASP design principles, and in particular, #4 - Information Expert. A Player object is the information expert regarding its own health.

    It is desirable to keep any calculation logic encapsulated within the class that manages the data that is involved in the calculation. Otherwise, you'll create problems related to duplication and lack of cohesiveness (things that are related to each other should be close together).

    Here's the alternative, where the logic for reducing a player's health is outside of the Player class:

    With this code, the encapsulation of the Player class is said to be broken and there is no cohesion between the calculation logic and the data for a Player's health. The potential problem here is that the calculation logic will start getting duplicated everywhere a player's health needs to be affected:


    Duplication is NOT GOOD! It is the source of bugs in your program because if you change one of those lines that calculate health, you probably should have to make sure to change any other lines like it as well. If that logic were kept encapsulated in the Player.hitWith(Weapon) method, then you only need to change the logic in one place.
     
    Junilu Lacar
    Sheriff
    Posts: 13555
    223
    Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
    • Likes 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    You might notice in the examples in my previous reply that I marked the logic to increase the health of a player when it given some medicine as duplication. Even though the calculation is different, i.e., addition instead of subtraction, the intent is still the same: to affect the player's health in some way. So, duplication does not necessarily have to be in the form of exact calculations. In fact, you could have the same exact kind of calculation in two different places but if the intent is different, that still would not be duplication.

    Duplication, as defined by the DRY Principle (Don't Repeat Yourself) is really about knowledge/intent. Any knowledge of how to implement an intent should be in one and only place in your program. Otherwise, your program logic and its related data become less cohesive and less encapsulated and that's a Bad Thing.
     
    Junilu Lacar
    Sheriff
    Posts: 13555
    223
    Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
    • Likes 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Another way your code becomes less cohesive is when you mix two or more intents in one method. Take for example your tiradaTurno() method. From what I can see, this method mixes two intents in one place: the intents of "attacking the enemy" and "be attacked by the enemy." This is not good because it complicates your logic and makes it more difficult to test the two intents independently. It is also harder to read the code.

    Making your code readable and well-organized should be a primary concern when you write code. If you write readable code, it's easier to understand and debug. Unreadable and disorganized code is the breeding ground of bugs that are difficult to find, as well as frustration and despair. Unreadable and disorganized code is a time sink: it wastes your time and the time of anybody else who comes after you to read and maintain your code.

    #5 of GRASP is High Cohesion
     
    salvin francis
    Bartender
    Posts: 2326
    100
    Google Web Toolkit Eclipse IDE Java
    • Likes 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    A lot of comments from where I last left !!!
    I agree there is a code smell with hasHealthOrStrength. This method signature would have been better alternatives :

    However, I think Junilu has flipped the perspectively rightly making it compliant with the Open Closed principle. I dont think I would have thought of "Life" as a class name. Life in gaming can also mean how many respawns a player has (e.g. Super Mario allows 3 respawns). However, health/strength are attributes of a single Life in the above structure. Maybe we can call it PlayerVitals or something similar ?
    Item too is not a good name for Health/Strength.
     
    Junilu Lacar
    Sheriff
    Posts: 13555
    223
    Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I'm no gamer so if you say PlayerVitals or Vitals is a better name for that concept, I'd have no argument with that.
     
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!