before I do that, I want you to see that this snippet of code works but the text overwrites more text, I want the “straight” text to print out, but I don't want “high card” text to print out on top of it like it does I have a problem with my if/else if statements, yes I know I am using many if statements but at least the code compiles
if (player_hand.rank == 0)
{
if (arr[0] == 1 && arr[1] == 2 && arr[2] == 3 && arr[3] == 4 && arr[4] == 5)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 2 && arr[1] == 3 && arr[2] == 4 && arr[3] == 5 && arr[4] == 6)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 3 && arr[1] == 4 && arr[2] == 5 && arr[3] == 6 && arr[4] == 7)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 4 && arr[1] == 5 && arr[2] == 6 && arr[3] == 7 && arr[4] == 8)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 5 && arr[1] == 6 && arr[2] == 7 && arr[3] == 8 && arr[4] == 9)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 6 && arr[1] == 7 && arr[2] == 8 && arr[3] == 9 && arr[4] == 10)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 7 && arr[1] == 8 && arr[2] == 9 && arr[3] == 10 && arr[4] == 11)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 8 && arr[1] == 9 && arr[2] == 10 && arr[3] == 11 && arr[4] == 12)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 9 && arr[1] == 10 && arr[2] == 11 && arr[3] == 12 && arr[4] == 13)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (arr[0] == 10 && arr[1] == 11 && arr[2] == 12 && arr[3] == 13 && arr[4] == 1)
{
surface_fourteen = TTF_RenderText_Solid(font, text_seven, textColor);
SDL_BlitSurface(surface_fourteen, NULL, gScreenSurface, &score_one);
}
if (flush_found == false)
{
surface_one = TTF_RenderText_Solid(font, text, textColor);
SDL_BlitSurface(surface_one, NULL, gScreenSurface, &score_one);
}
else if (flush_found == true)
{
surface_thirteen = TTF_RenderText_Solid(font, text_six, textColor);
SDL_BlitSurface(surface_thirteen, NULL, gScreenSurface, &score_one);
}
}