tools.cpp

 /* this source file is where the tools from the menu on top will be
   calculatated. The tools will be inputted in the workspace (see
   screen laypout for more info) & probably outputted on the cells
*/

#include <stdio.h>
#include <conio.h>
#include <iostream.h>
#include <windows.h>
#include <process.h>


int findlocation(void)
{
char cell;
int x;
int y;
cout<<"Please Type in the X axis:\t";
cin>>cell;
cout<<"Choose your Y axis:\t";
cin>>y;
if (cell=='a'||cell=='A')
{
x=1;
}
if (cell=='b'||cell=='B')
{
x=2;
}
if(cell=='c'||cell=='C')
{
x=3;
}
if(cell=='d'||cell=='D')
{
x=4;
}
if(cell=='e'||cell=='E')
{
x=5;
}
if(cell=='f'||cell=='F')
{
x=6;
}
if(cell=='g'||cell=='G')
{
x=7;
}
if(cell=='h'||cell=='H')
{
x=8;
}
if(cell=='i'||cell=='I')
{
x=9;
}
if(cell=='j'||cell=='J')
{
x=10;
}
if (x>1)
{
x=(x*8)-6;
}
if (x<=1)
{
x=(x*8)-5;
}
y=(y*2)+5;
HANDLE hConsole=GetStdHandle (STD_OUTPUT_HANDLE);;
COORD coordScreen = { x, y };
SetConsoleCursorPosition( hConsole, coordScreen );
return 0;
}



Project Homepage: