i saw a video on tiktok of someone advertising a kind of game so i found it interstaing and wanted to do it the link for the video uploaded :
it is about 8 pages and if they are all togather they show 4*13 symbol but each one have some missing symbols
if the user chose a symbol from the all pages combined then i show him the pages each one alone if he said that his symbol in one of these pages then the page get abandoned when he finish i combine the rest which his symbol didn't appear on them and the only symbol that will be missing is what he thought about for more understanding see the video
i wrote this code as it shows the main page(the 8 pages combined)
i added some colors' functions just forget about it
#include <iostream>
#include <windows.h>
using namespace std;
HANDLE hc=GetStdHandle(STD_OUTPUT_HANDLE);
char elements[4][13]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','#','$','!','?','=','%','+','-','*','1','2','3','4','5','6','7','8','9','0',3,2,5,'&',14,15,6};
void main_page(){
SetConsoleTextAttribute(hc,11*16);
cout<<string(65,' ')<<"\n";
for(int i=0 ;i<4;i++){
for(int j=0 ;j<13;j++){
cout<<" ";
SetConsoleTextAttribute(hc,14);
cout<<" "<<elements[i][j]<<" ";
SetConsoleTextAttribute(hc,11*16);
cout<<" ";
}
cout<<endl<<string(65,' ')<<endl;
}
SetConsoleTextAttribute(hc,7);
}
i wanted to start writing the functions for the rest pages as it will ask the user if his symbol is here or not if it is it will abandon it else it will keep it and then compare between the pages to see what is missing and show it but i didn't know how let the computer know that this symbol is missing (saying is easier than doing)
if anyone can help me and tell me what should i do and how can i compare between the missing things i would appreciate it forever
Aucun commentaire:
Enregistrer un commentaire