im at a point where, i cant continue. im totally stuck.
i want to switch all the valid empty pieces that can move with "E" for empty.
im also having trouble with the logic of the c++
how would i change the color of @ or $
[code]
include <iostream>
#include <fstream>
using namespace std;
const int ROWS = 8;
const int COLS = 8;
return;
}
void display(char board[][COLS])
{
int i, j;
// column labels
printf("+---+---+---+---+---+---+---+---+\n");
cout << " ";
for (i = 0; i < COLS; i++)
cout << ' ' << i << ' ';
for (i = 0; i < ROWS; i++)
{
cout << endl;
//row label
cout << i << " ";
for (j = 0; j < COLS; j++)
//don't display the -
if (board[i][j] == '-')
cout << " E ";
else
cout << ' ' << board[i][j] << ' ';
cout << endl;
}
return;
}
void save(char board[][COLS])
{
ofstream fout;
int i, j;
fout.open("gameBoard.txt");
for (i = 0; i < ROWS; i++)
{
for (j = 0; j < COLS; j++)
fout << board[i][j] << ' ';
fout << endl;
}
fout.close();
return;
}
void readSaved(char board[][COLS])
{
int i, j;
ifstream fin;
fin.open("gameBoard.txt");
for (i = 0; i < ROWS; i++)
for (j = 0; j < COLS; j++)
fin >> board[i][j];
fin.close();
return;
}
/*
void Display_fancy(int d[][COLS])
{
int rr, cc;