Passing Array Coordinates.

I am attempting to write a checkers program for a class project. My current problem is passing the coordinates of the pieces from one function to the next. I have 4 files RuleBase, CaseBase, Checkers, Gameloop. The rule base .h an .cpp files haven't been written yet. But the Casebase has been started along with the checkers and gameloop.

CaseBase.h:
int JumpCheck([x],[y]);


CaseBase.cpp:
#include <iostream>
#include "CaseBase.h";
int JumpCheck([x],[y])
{
switch (int x, int y)//input of computer move
case:
{
if (([x-1] && [y-1] == S||N) && ([x-2] && [y-2] == " "));
[x],[y]= " ";
[x-1], [y-1] = " ";
[x-2], [y-2] = "H";
break;
}
return 0;

Board.h:
#pragma once
#include <iostream>
#include <string.h>
using namespace std;
using std::string;

class CheckerBoard
{
private:

public:
void checkmove(char, char);
void DrawBoard();
void updateBoard();
CheckerBoard(); //Default constructor
~CheckerBoard(); //Default destructor

};


Board.cpp
#include "Board.h"
#include <iostream>
#include "string.h"
using namespace std;

void CheckerBoard::DrawBoard()
{
cout <<checkerboard;
}
void CheckerBoard::updateBoard()
{
cout<<checkerboard;
}

CheckerBoard::~CheckerBoard(void)//default destructor
{}

GameLoop.cpp
#include <iostream>
#include "string.h"
#include "GameLoop.h"
#include "Board.h"
using namespace std;
using std::string;
using std::cout;
using std::cin;
using std::endl;


int control = 0;
char PlayermoveX=0; //The player input for their move x coordinate
int PlayermoveY=0; // The Player input for there move y coordinate
int SandHPieces = 12; //Remaining player pieces
int NandUPieces =12; //Remaining computer pieces

CheckerBoard checkerboard;

void PlayerTurn ()
{

cout<<"Please enter your move"<<endl;
cin>> PlayermoveX;
cin>>PlayermoveY;
checkmove(PlayermoveX, PlayermoveY);
}

void ComputerTurn()
{
calls to casebase reasoning and rulebased calculates jumps and moves
}

int checkmove(int X,int Y)
{
if (((checkerboard[X+1],[Y+1]) == "S"||"N"||"X"||" ") && (checkerboard[X+1], [Y+1] == "S" ||"N"||"X"||" "))
{
cout<<"There is no valid move for this piece. Please try again"<<endl;
PlayerTurn();
};
else
cout<<" ";
}

GameLoop.h

#pragma once
#include <iostream>
//#include <string.h>
//#include <string>//
//#include "GameLoop.h"

void PlayerTurn();
void ComputerTurn();
int checkmove(int, int);
Topic archived. No new replies allowed.