I'm trying to make a simulation of Travelling sales man problem. So I got random circles spawning and each circle.
I want to make it so I can switch between the circles. Currently the player spawns to the first circle created which is in position (cir[0].x, cir[0].y). However, I'm trying to make an input so you can type in for example 12 and the position of the queen would now be (cir[12].x, cir[12].y). But, this seems to not work.
int number;
cin>>number;
if(number<NUMCIRC)
{
switch(number)
{
case number:
queenX = cir[number].x;
queenY= cir[number].y;
break;
default: break;
}
}
I was wondering as surely if I input the number and then press enter it should jump to the number. Assuming it's smaller than NUMCIRC, which is the number of circles that I have spawned.