The Plural Utility

The plural utility is used for seeing if a word should end in s or ies or just leave it alone without any modification.

Testing a Word

Before you start using the PlualUtil, you must first import it by importing, import com.wearedevs.someclicker2.util.PluralUtil;. After you have imported our RandomUtil you may now type PluralUtil.fromNumber(); The fromNumber() method takes in two parameters, first the number of something you want to test, and the word to modify from that number.
Say I wanted to test if the variable clicks is more than one so I can add an s at the end if it is. I would type,

PluralUtil.fromNumber((int) Main.clicks, "Click")

Since the variable clicks is a double so we can store more clicks, we have to cast int to clicks. We can use this string some where else like, drawing a string to the canvas, or printing something in console. We can do this by doing,

logger.info("You Have: " + Main.clicks + PluralUtil.fromNumber(Main.clicks, "Click"));

//If You Have 2 Clicks, The Output Would Be:
//You Have: 2 Clicks.