Question: I have a code a puzzle game, I am sharing the code below, I need you to add some features to make the game more
I have a code a puzzle game, I am sharing the code below, I need you to add some features to make the game more interesting and advance. please add featureseg timer countdown sec moves counter and limit and more features in the code and explain them as well. you can use your own images and audios in the code just mention those parts so I can make changes as per my needs, please answer in the form of code I have project submission tomorrow and its urgent. #include
#include
#include
#define SIZE
#define CELLSIZE
#define BOARDSIZE SIZE CELLSIZE
Function to draw the board on the screen
void drawBoardint numbers
cleardevice;
setbkcolorYELLOW;
settextstyleBOLDFONT, HORIZDIR, ;
for int i ; i SIZE; i
char buffer;
sprintfbufferd numbersi;
rectanglei CELLSIZE, i CELLSIZE, CELLSIZE;
outtextxyi CELLSIZE CELLSIZE CELLSIZE buffer;
settextstyle;
readimagefileelectrodesplacejpg;
outtextxy"electrodes ;
readimagefilerightlegdriverjpg;
outtextxy"right leg driver;
readimagefilehighpassfiljpg;
outtextxy"high pass filter;
readimagefilepatientjpg;
outtextxy"patient ;
readimagefilewaveformjpg;
outtextxy waveform ;
readimagefileoutputjpg;
outtextxy hardware pc interface;
readimagefileisolationampjpg;
outtextxy isolation amplifier;
readimagefileleadseljpg;
outtextxy lead selection ;
readimagefilelowpassfiljpg;
outtextxy low pass filter;
readimagefileinstrumentationampjpg;
outtextxy"instrumentation amplifier;
getch;
Function to check if the board is in the correct order
bool checkBoardint numbers
for int i ; i SIZE; i
if numbersi i
return false;
return true;
int main
initwindow signal acquiring game ;
outtextxy"Biomedical Engineering games presents";
outtextxy"Body Signal Acquisition Game";
readimagefileBiomedicalengineeringjpg;
getch;
cleardevice;
setcolorRED;
settextstyle;
outtextxy LOADING ;
rectangle;
forint i; i;i
setcolorGREEN;
rectanglei;
delay;
cleardevice;
getch;
settextstyle;
outtextxy "Introduction";
outtextxy"This game is designed for biomedical engineers to test and refresh their knowledge";
outtextxy of basic building structure of machines that acquire body signals ;
outtextxy"Press enter key to continue...";
getch;
cleardevice;
settextstyle;
outtextxy "Instructions ;
outtextxy Each component of the machine has been assigned a numeric value";
outtextxy The user has to arrange the numbers according to the ordered placement of components";
outtextxyclick the number you want to swap ;
outtextxy Only when you have placed the components in correct order the game will terminate";
outtextxy"Press enter key to continue...";
getch;
int numbersSIZE;
bool gameWon false;
while gameWon
drawBoardnumbers;
int input getch;
Find the index of the input number
int index ;
for int i ; i SIZE; i
if numbersi input
index i;
break;
Swap the input number with the adjacent number on the board
if index && numbersindex numbersindex
std::swapnumbersindex numbersindex ;
else if index SIZE && numbersindex numbersindex
std::swapnumbersindex numbersindex ;
Check if the board is in the correct order
if checkBoardnumbers
gameWon true;
cleardevice;
setcolorRED;
settextstyleBOLDFONT, HORIZDIR, ;
outtextxy "Congratulations! You know your way around EEG,ECG,EMG machines.";
getch;
closegraph;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
