public static MvcHtmlString PrintFurnitureAvailability(FurnitureViewModel furniture) { string output; var minutesUntilReuse = FurnitureProcedures.GetMinutesUntilReuse(furniture); if (minutesUntilReuse <= 0) { output = "<span class='good'>Available for use!</span>"; } else { output = "<span class = 'bad'>Available in " + (int)Math.Ceiling(minutesUntilReuse) + " minutes.</span>"; } return(new MvcHtmlString(output)); }
public bool CanUse(int playerId) { return(!this.IsLastUser(playerId) && FurnitureProcedures.GetMinutesUntilReuse(this) <= 0); }