Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual alleles tracker #2

Open
FLAK-ZOSO opened this issue Jan 25, 2024 · 1 comment
Open

Visual alleles tracker #2

FLAK-ZOSO opened this issue Jan 25, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@FLAK-ZOSO
Copy link
Member

It should be possible to give each Organism a color or even a number based on a certain allele.

You toggled the view for the gene <gene-name>

We already have the gene names...

Starklag/dna.cpp

Lines 29 to 34 in fff7857

std::unordered_map<Gene, std::string> gene_to_string = {
{Gene::SPEED, "speed"}, {Gene::STRENGTH, "strength"},
{Gene::FERTILITY, "fertility"}, {Gene::NATURE, "nature"},
{Gene::LIFESPAN, "lifespan"}, {Gene::ATTACK, "attack"},
{Gene::DEFENSE, "defense"}, {Gene::VISION, "vision"}
};

...now the time it has come to do all the rest.

We could switch between and toggle the different genes view this way...

<gene-name><ENTER>
@FLAK-ZOSO FLAK-ZOSO added the enhancement New feature or request label Jan 25, 2024
@FLAK-ZOSO FLAK-ZOSO self-assigned this Jan 25, 2024
@FLAK-ZOSO
Copy link
Member Author

I would rather switch using command line arguments, like ../../starklag -A speed or ../../starklag -A 0.

It would be difficult to handle the priting via the Sista library, in particular...

  • how to save the original symbol attributes? Maybe it's not necessary since at this point we could assign the symbols on the fly depending on the specified gene

Should we use the symbol or the colors? This last option seems to be more doable.

ANSI::BackgroundColor assignColor(DNA* dna, Gene gene); // Assign color basing the choice on a certain gene

At least this seems to generate less bloatware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant