Skip to content

DIFFICULTIES[]could be replaced by Difficulties[i].ToPascalCase() #18

@BinToss

Description

@BinToss

Why have two arrays of values that differ by character cases?

const char *DIFFICULTIES[] = {
	"Noble",
	"Normal",
	"Heroic",
	"Legendary"
};

const char *Difficulties[] = {
	"noble",
	"normal",
	"heroic",
	"legendary"
};
std::string difficulty_str;
std::string real_difficulty;
if (difficulty < 4) {
    real_difficulty = Difficulties[difficulty];
    difficulty_str = DIFFICULTIES[difficulty];
    difficulty_str += " Difficulty";
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions