Witam. Chciałem zrobić w konsoli grę strategiczną, turową. (Na razie mam entuzjastyczne nastawienie, bo jeszcze nie dotarłem do losowego generatora mapy i inteligencji przeciwników)
Otóż chciałbym, żeby dane dotyczące krajów były wczytywanie z pliku, a kraje mają być obiektami.
No i niby wszystko jest, tylko że nie wiem, gdzie i jak utworzyć te obiekty…
Chodzi o to, że nie mogę zrobić tego w funkcji, ponieważ main nie widzi wtedy jego obiektu.
Dla testu samego wczytywania, zrobiłem taki osobny programik.
#include <iostream>
#include <cstdlib>
#include <windows.h>
#include <fstream>
#include <sstream>
#include "klasy.h"
using namespace std;
HANDLE hOut;
fstream plik;
int kraje;
string z_pliku[11];
void kolor(HANDLE h, string fore, string bck);
bool wczytaj_kraj();
int main()
{
hOut = GetStdHandle( STD_OUTPUT_HANDLE );
wczytaj_kraj();
for(int i; i<kraje; i++)
{
cout << kraj[i].nazwa << endl;
cout << kraj[i].skrot << endl;
cout << endl;
cout << kraj[i].flaga[0] << endl;
cout << kraj[i].flaga[1] << endl;
cout << kraj[i].flaga[2] << endl;
cout << kraj[i].flaga[3] << endl;
cout << kraj[i].flaga[4] << endl;
cout << kraj[i].flaga[5] << endl;
}
return 0;
}
bool wczytaj_kraj()
{
string krajuchny;
plik.open("kraje/kraje.txt", ios::in);
if(plik.good()==true)
{
getline(plik, krajuchny);
istringstream iss(krajuchny);
iss >> kraje;
Kraj kraj[kraje];
int licznik = 0;
int licznik2 = 0;
while(getline(plik, z_pliku[licznik]))
{
if(licznik==1) kraj[licznik2].nazwa = z_pliku[licznik];
if(licznik==2) kraj[licznik2].skrot = z_pliku[licznik];
if(licznik==3) kraj[licznik2].flaga[0] = z_pliku[licznik];
if(licznik==4) kraj[licznik2].flaga[1] = z_pliku[licznik];
if(licznik==5) kraj[licznik2].flaga[2] = z_pliku[licznik];
if(licznik==6) kraj[licznik2].flaga[3] = z_pliku[licznik];
if(licznik==7) kraj[licznik2].flaga[4] = z_pliku[licznik];
if(licznik==8) kraj[licznik2].flaga[5] = z_pliku[licznik];
if(licznik==10)
{
licznik = 0;
licznik2++;
}
licznik++;
}
return true;
}
else
{
system("cls");
kolor(hOut, "lgold", "none");
cout << " ##############################" << endl;
cout << " #";
kolor(hOut, "lred", "none");
cout << "Nie udalo sie wczytac krajow";
kolor(hOut, "lgold", "none");
cout << "#" << endl;
cout << " ##############################" << endl;
return false;
}
}
void kolor(HANDLE h, string fore, string bck) //funkcja do kolorkow
{
//TEKST
//ciemne
if((fore=="blue")&&(bck=="none")) SetConsoleTextAttribute(h, FOREGROUND_BLUE);
if((fore=="red")&&(bck=="none")) SetConsoleTextAttribute(h, FOREGROUND_RED);
if((fore=="green")&&(bck=="none")) SetConsoleTextAttribute(h, FOREGROUND_GREEN);
if((fore=="cyan")&&(bck=="none")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN);
if((fore=="violet")&&(bck=="none")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED);
if((fore=="gold")&&(bck=="none")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN);
if((fore=="white")&&(bck=="none")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED);
//jasne
if((fore=="lblue")&&(bck=="none")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_INTENSITY);
if((fore=="lred")&&(bck=="none")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lgreen")&&(bck=="none")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lcyan")&&(bck=="none")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lviolet")&&(bck=="none")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lgold")&&(bck=="none")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lwhite")&&(bck=="none")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY);
//TLO
//ciemne
if((fore=="none")&&(bck=="blue")) SetConsoleTextAttribute(h, BACKGROUND_BLUE);
if((fore=="none")&&(bck=="red")) SetConsoleTextAttribute(h, BACKGROUND_RED);
if((fore=="none")&&(bck=="green")) SetConsoleTextAttribute(h, BACKGROUND_GREEN);
if((fore=="none")&&(bck=="cyan")) SetConsoleTextAttribute(h, BACKGROUND_BLUE | BACKGROUND_GREEN);
if((fore=="none")&&(bck=="violet")) SetConsoleTextAttribute(h, BACKGROUND_BLUE | BACKGROUND_RED);
if((fore=="none")&&(bck=="gold")) SetConsoleTextAttribute(h, BACKGROUND_RED | BACKGROUND_GREEN);
if((fore=="none")&&(bck=="white")) SetConsoleTextAttribute(h, BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_GREEN);
//jasne
if((fore=="none")&&(bck=="lblue")) SetConsoleTextAttribute(h, BACKGROUND_BLUE | BACKGROUND_INTENSITY);
if((fore=="none")&&(bck=="lred")) SetConsoleTextAttribute(h, BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="none")&&(bck=="lgreen")) SetConsoleTextAttribute(h, BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="none")&&(bck=="lcyan")) SetConsoleTextAttribute(h, BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="none")&&(bck=="lviolet")) SetConsoleTextAttribute(h, BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="none")&&(bck=="lgold")) SetConsoleTextAttribute(h, BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="none")&&(bck=="lwhite")) SetConsoleTextAttribute(h, BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
//NIEBIESKI&TLO
//ciemne
if((fore=="blue")&&(bck=="blue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE);
if((fore=="blue")&&(bck=="red")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_RED);
if((fore=="blue")&&(bck=="green")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_GREEN);
if((fore=="blue")&&(bck=="cyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | BACKGROUND_GREEN);
if((fore=="blue")&&(bck=="violet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | BACKGROUND_RED);
if((fore=="blue")&&(bck=="gold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED);
if((fore=="blue")&&(bck=="white")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED);
//jasne
if((fore=="blue")&&(bck=="lblue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | BACKGROUND_INTENSITY);
if((fore=="blue")&&(bck=="lred")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="blue")&&(bck=="lgreen")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="blue")&&(bck=="lcyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="blue")&&(bck=="lviolet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="blue")&&(bck=="lgold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="blue")&&(bck=="lwhite")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY);
//CZERWONY&TLO
//ciemne
if((fore=="red")&&(bck=="blue")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE);
if((fore=="red")&&(bck=="red")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_RED);
if((fore=="red")&&(bck=="green")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_GREEN);
if((fore=="red")&&(bck=="cyan")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN);
if((fore=="red")&&(bck=="violet")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_RED);
if((fore=="red")&&(bck=="gold")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_GREEN);
if((fore=="red")&&(bck=="white")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED);
//jasne
if((fore=="red")&&(bck=="lblue")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY);
if((fore=="red")&&(bck=="lred")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="red")&&(bck=="lgreen")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="red")&&(bck=="lcyan")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="red")&&(bck=="lviolet")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="red")&&(bck=="lgold")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="red")&&(bck=="lwhite")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY);
//ZIELONY&TLO
//ciemne
if((fore=="green")&&(bck=="blue")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE);
if((fore=="green")&&(bck=="red")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_RED);
if((fore=="green")&&(bck=="green")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_GREEN);
if((fore=="green")&&(bck=="cyan")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN);
if((fore=="green")&&(bck=="violet")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED);
if((fore=="green")&&(bck=="gold")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_GREEN);
if((fore=="green")&&(bck=="white")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED);
//jasne
if((fore=="green")&&(bck=="lblue")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY);
if((fore=="green")&&(bck=="lred")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="green")&&(bck=="lgreen")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="green")&&(bck=="lcyan")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="green")&&(bck=="lviolet")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="green")&&(bck=="lgold")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="green")&&(bck=="lwhite")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY);
//TURKUS&TLO
//ciemne
if((fore=="cyan")&&(bck=="blue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE);
if((fore=="cyan")&&(bck=="red")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_RED);
if((fore=="cyan")&&(bck=="green")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_GREEN);
if((fore=="cyan")&&(bck=="cyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN);
if((fore=="cyan")&&(bck=="violet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED);
if((fore=="cyan")&&(bck=="gold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_GREEN);
if((fore=="cyan")&&(bck=="white")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED);
//jasne
if((fore=="cyan")&&(bck=="lblue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY);
if((fore=="cyan")&&(bck=="lred")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="cyan")&&(bck=="lgreen")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="cyan")&&(bck=="lcyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="cyan")&&(bck=="lviolet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="cyan")&&(bck=="lgold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="cyan")&&(bck=="lwhite")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY);
//FIOLET&TLO
//ciemne
if((fore=="violet")&&(bck=="blue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE);
if((fore=="violet")&&(bck=="red")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_RED);
if((fore=="violet")&&(bck=="green")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_GREEN);
if((fore=="violet")&&(bck=="cyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN);
if((fore=="violet")&&(bck=="violet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_RED);
if((fore=="violet")&&(bck=="gold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_GREEN);
if((fore=="violet")&&(bck=="white")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED);
//jasne
if((fore=="violet")&&(bck=="lblue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY);
if((fore=="violet")&&(bck=="lred")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="violet")&&(bck=="lgreen")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="violet")&&(bck=="lcyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="violet")&&(bck=="lviolet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="violet")&&(bck=="lgold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="violet")&&(bck=="lwhite")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY);
//ZLOTY&TLO
//ciemne
if((fore=="gold")&&(bck=="blue")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE);
if((fore=="gold")&&(bck=="red")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_RED);
if((fore=="gold")&&(bck=="green")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_GREEN);
if((fore=="gold")&&(bck=="cyan")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN);
if((fore=="gold")&&(bck=="violet")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED);
if((fore=="gold")&&(bck=="gold")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_GREEN);
if((fore=="gold")&&(bck=="white")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED);
//jasne
if((fore=="gold")&&(bck=="lblue")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY);
if((fore=="gold")&&(bck=="lred")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="gold")&&(bck=="lgreen")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="gold")&&(bck=="lcyan")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="gold")&&(bck=="lviolet")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="gold")&&(bck=="lgold")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="gold")&&(bck=="lwhite")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY);
//BIALY&TLO
//ciemne
if((fore=="white")&&(bck=="blue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE);
if((fore=="white")&&(bck=="red")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_RED);
if((fore=="white")&&(bck=="green")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_GREEN);
if((fore=="white")&&(bck=="cyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN);
if((fore=="white")&&(bck=="violet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_RED);
if((fore=="white")&&(bck=="gold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_GREEN);
if((fore=="white")&&(bck=="white")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED);
//jasne
if((fore=="white")&&(bck=="lblue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY);
if((fore=="white")&&(bck=="lred")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="white")&&(bck=="lgreen")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="white")&&(bck=="lcyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="white")&&(bck=="lviolet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY);
if((fore=="white")&&(bck=="lgold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
if((fore=="white")&&(bck=="lwhite")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY);
//JASNY NIEBIESKI&TLO
//ciemne
if((fore=="lblue")&&(bck=="blue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | FOREGROUND_INTENSITY);
if((fore=="lblue")&&(bck=="red")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lblue")&&(bck=="green")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lblue")&&(bck=="cyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lblue")&&(bck=="violet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lblue")&&(bck=="gold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lblue")&&(bck=="white")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | FOREGROUND_INTENSITY);
//jasne
if((fore=="lblue")&&(bck=="lblue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lblue")&&(bck=="lred")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lblue")&&(bck=="lgreen")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lblue")&&(bck=="lcyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lblue")&&(bck=="lviolet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lblue")&&(bck=="lgold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lblue")&&(bck=="lwhite")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
//JASNY CZERWONY&TLO
//ciemne
if((fore=="lred")&&(bck=="blue")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | FOREGROUND_INTENSITY);
if((fore=="lred")&&(bck=="red")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lred")&&(bck=="green")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lred")&&(bck=="cyan")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lred")&&(bck=="violet")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lred")&&(bck=="gold")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lred")&&(bck=="white")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | FOREGROUND_INTENSITY);
//jasne
if((fore=="lred")&&(bck=="lblue")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lred")&&(bck=="lred")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lred")&&(bck=="lgreen")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lred")&&(bck=="lcyan")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lred")&&(bck=="lviolet")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lred")&&(bck=="lgold")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lred")&&(bck=="lwhite")) SetConsoleTextAttribute(h, FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
//JASNY ZIELONY&TLO
//ciemne
if((fore=="lgreen")&&(bck=="blue")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | FOREGROUND_INTENSITY);
if((fore=="lgreen")&&(bck=="red")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lgreen")&&(bck=="green")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lgreen")&&(bck=="cyan")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lgreen")&&(bck=="violet")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lgreen")&&(bck=="gold")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lgreen")&&(bck=="white")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | FOREGROUND_INTENSITY);
//jasne
if((fore=="lgreen")&&(bck=="lblue")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lgreen")&&(bck=="lred")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lgreen")&&(bck=="lgreen")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lgreen")&&(bck=="lcyan")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lgreen")&&(bck=="lviolet")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lgreen")&&(bck=="lgold")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lgreen")&&(bck=="lwhite")) SetConsoleTextAttribute(h, FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
//JASNY TURKUS&TLO
//ciemne
if((fore=="lcyan")&&(bck=="blue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | FOREGROUND_INTENSITY);
if((fore=="lcyan")&&(bck=="red")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lcyan")&&(bck=="green")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lcyan")&&(bck=="cyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lcyan")&&(bck=="violet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lcyan")&&(bck=="gold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lcyan")&&(bck=="white")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | FOREGROUND_INTENSITY);
//jasne
if((fore=="lcyan")&&(bck=="lblue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lcyan")&&(bck=="lred")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lcyan")&&(bck=="lgreen")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lcyan")&&(bck=="lcyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lcyan")&&(bck=="lviolet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lcyan")&&(bck=="lgold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lcyan")&&(bck=="lwhite")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
//JASNY FIOLET&TLO
//ciemne
if((fore=="lviolet")&&(bck=="blue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | FOREGROUND_INTENSITY);
if((fore=="lviolet")&&(bck=="red")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lviolet")&&(bck=="green")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lviolet")&&(bck=="cyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lviolet")&&(bck=="violet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lviolet")&&(bck=="gold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lviolet")&&(bck=="white")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | FOREGROUND_INTENSITY);
//jasne
if((fore=="lviolet")&&(bck=="lblue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lviolet")&&(bck=="lred")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lviolet")&&(bck=="lgreen")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lviolet")&&(bck=="lcyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lviolet")&&(bck=="lviolet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lviolet")&&(bck=="lgold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lviolet")&&(bck=="lwhite")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
//JASNY ZLOTY&TLO
//ciemne
if((fore=="lgold")&&(bck=="blue")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | FOREGROUND_INTENSITY);
if((fore=="lgold")&&(bck=="red")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lgold")&&(bck=="green")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lgold")&&(bck=="cyan")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lgold")&&(bck=="violet")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lgold")&&(bck=="gold")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lgold")&&(bck=="white")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | FOREGROUND_INTENSITY);
//jasne
if((fore=="lgold")&&(bck=="lblue")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lgold")&&(bck=="lred")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lgold")&&(bck=="lgreen")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lgold")&&(bck=="lcyan")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lgold")&&(bck=="lviolet")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lgold")&&(bck=="lgold")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lgold")&&(bck=="lwhite")) SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
//JASNY BIALY&TLO
//ciemne
if((fore=="lwhite")&&(bck=="blue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | FOREGROUND_INTENSITY);
if((fore=="lwhite")&&(bck=="red")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lwhite")&&(bck=="green")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lwhite")&&(bck=="cyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lwhite")&&(bck=="violet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_RED | FOREGROUND_INTENSITY);
if((fore=="lwhite")&&(bck=="gold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_GREEN | FOREGROUND_INTENSITY);
if((fore=="lwhite")&&(bck=="white")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | FOREGROUND_INTENSITY);
//jasne
if((fore=="lwhite")&&(bck=="lblue")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lwhite")&&(bck=="lred")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lwhite")&&(bck=="lgreen")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lwhite")&&(bck=="lcyan")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lwhite")&&(bck=="lviolet")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lwhite")&&(bck=="lgold")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
if((fore=="lwhite")&&(bck=="lwhite")) SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY | FOREGROUND_INTENSITY);
}
Jeszcze plik z państwami, dla ciekawskich (litery będą później zamienione na kolory)
(wiem, flagi Wielkiej Brytanii i Stanów Zjednoczonych to masakra)
10
Polska
PL
wwwwwwwwwwwwwww
wwwwwwwwwwwwwww
wwwwwwwwwwwwwww
rrrrrrrrrrrrrrr
rrrrrrrrrrrrrrr
rrrrrrrrrrrrrrr
#
#
Wlk Brytania
GB
bbbwwbwrwbbwwbb
wwwwwwwrwwwwwww
rrrrrrrrrrrrrrr
wwwwwwwrwwwwwww
bbbbbwwrwwbbbbb
bbbwwbwrwbwwbbb
#
#
Rosja
RU
wwwwwwwwwwwwwww
wwwwwwwwwwwwwww
bbbbbbbbbbbbbbb
bbbbbbbbbbbbbbb
rrrrrrrrrrrrrrr
rrrrrrrrrrrrrrr
#
#
Niemcy
DE
---------------
---------------
rrrrrrrrrrrrrrr
rrrrrrrrrrrrrrr
yyyyyyyyyyyyyyy
yyyyyyyyyyyyyyy
#
#
Francja
FR
bbbbbwwwwwrrrrr
bbbbbwwwwwrrrrr
bbbbbwwwwwrrrrr
bbbbbwwwwwrrrrr
bbbbbwwwwwrrrrr
bbbbbwwwwwrrrrr
#
#
USA
US
wbwbwbwwwwwwwww
bwbwbwrrrrrrrrr
wbwbwbwwwwwwwww
rrrrrrrrrrrrrrr
wwwwwwwwwwwwwww
rrrrrrrrrrrrrrr
#
#
Ukraina
UA
sssssssssssssss
sssssssssssssss
sssssssssssssss
yyyyyyyyyyyyyyy
yyyyyyyyyyyyyyy
yyyyyyyyyyyyyyy
#
#
Litwa
LT
yyyyyyyyyyyyyyy
yyyyyyyyyyyyyyy
ggggggggggggggg
ggggggggggggggg
rrrrrrrrrrrrrrr
rrrrrrrrrrrrrrr
#
#
Wlochy
IT
gggggwwwwwrrrrr
gggggwwwwwrrrrr
gggggwwwwwrrrrr
gggggwwwwwrrrrr
gggggwwwwwrrrrr
gggggwwwwwrrrrr
#
#
Wietnam
VN
rrrrrrrrrrrrrrr
rrrrrrryrrrrrrr
rrrrryyyyyrrrrr
rrrrrryyyrrrrrr
rrrrrrryrrrrrrr
rrrrrrrrrrrrrrr