Help with minesweeper

Hey guys i dont know how to progress to finish off my minesweeper game i have no idea how to match the co-ordinates with the mines so that the player can find squares can anyone show me the code which will allow me to finish this game off as it is a starter project i cant seem to finish.

#include <iostream>
#include <windows.h>
#define _WIN32_WINNT 0x0500
#include <Windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <dos.h>
#include <fstream>
#include <sstream>
#include <time.h>
#include <string>
#include <conio.h>


using namespace std;

void resize_windows (int height, int width);
void resize_windows();
void draw_border(int xStart, int yStart, int breadth, int height);
void Play_game();
void High_score();
void Help();
void game_board(int Minegrid[9][9], int minecount, int xnum, int ynum);
void minestate(int mines[10]);
struct Score {
int time[4];
char name[8];
};
int main ()
{
resize_windows(600,600); //to resize the console window//
int choice = 0;
while (choice!= 5)
{
cout << "Manic Mines" << endl;

cout <<"Press 2 to play game" << endl;
cout <<"Press 3 for highscores" << endl;
cout <<"Press 4 for help" << endl;
cout <<"Press 5 to quit game" << endl;


{
cin >> choice;
switch (choice) //Switch used to decide which menu option you will choose//
{
case 2:
Play_game();
system ("CLS");
break;

case 3:
High_score();
system ("CLS");
break;

case 4:
Help();
system ("CLS");
break;
}
}
}
system("PAUSE");
return 0;
}

//***********ResizeWindowSubroutine*************************//
void resize_windows (int height, int breadth)
{
HWND console = GetConsoleWindow();
RECT r;
GetWindowRect (console, &r);

MoveWindow(console, r.left, r.top, height, breadth, TRUE);
}

//**********************Play_gameSubroutine******************//
void Play_game()
{
system ("CLS");
int minegrid [9][9] = {0};
int minecount = 0;
int xnum;
int ynum;
int i;
int j;

//Randomseed//
srand(time(NULL));

do
{
xnum = rand () % 9 + 1;
ynum = rand () % 9 + 1;

if
(minegrid[xnum][ynum]!=9)

{
minegrid[xnum][ynum] = 9;

minecount ++;
}



} while (minecount < 10);



for ( i=0;i<9; i++)
{
for ( j=0;j<9;j++)
{
cout << minegrid[i][j];
cout << " " << endl;
}
cout << endl;
cout << endl;
cout << "Select the grid co-ordinates you wish to choose" << endl;

system("PAUSE");
}

//************************High_scoreSubroutine****************//

void High_score()
{
system ("CLS");
}

//************************HelpSubroutine************************//

void Help()
{
int goback;
system ("CLS");

cout <<"How to play:" << endl;
cout << endl;
cout <<"Manic Mines is a game about finding mines in the game board." << endl;
cout << endl;
cout <<"Type in the co-ordinates of the square you wish to manipulate." << endl;
cout << endl;
cout <<"There is 3 options to manipulate the board." << endl;
cout << endl;
cout <<"If you hit a mine then the game will end." << endl;
cout << endl;
cout <<"There will be 10 mines in the grid to find." << endl;
cout << endl;
cout <<"When you first uncover a square you cannot detonate a mine." << endl;
cout << endl;
cout <<"When you select a square and it is not a mine," << endl;
cout << endl;
cout <<"Then the areas around it will be uncovered." << endl;
cout << endl;
cout <<"Your highscore will be based on time completed." << endl;
cout << endl;
cout <<"A score will not be saved if you fail to clear the board." << endl;
cout << endl;
cout <<"Good Luck!!!" << endl;
cout << endl;
cout <<"Happy Manic Mining..." << endl;
cout << endl;
system("PAUSE");
}

Thanks all
Topic archived. No new replies allowed.