Minesweeper game

Hi all,
Right now, im working my final project for a class.
We're supposed to be recreating the game "Minesweeper"
I'm still in the early stages of production of this thing, so what you're seeing is just the bare bones of what i've written so far.
Here's what I have so far:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>
using namespace std;

int main(){
    srand(time(NULL));
    bool minefield [4][4] = { {false, false, false, false},
                              {false, false, false, false},
                              {false, false, false, false},
                              {false, false, false, false} };
    int mines = 4;
    while(mines > 0){
                int placeMineX, placeMineY;
                do {
                    placeMineX = rand()%4;
                    placeMineY = rand()%4;
                } 
                while (minefield [placeMineX] [placeMineY] == true);
                minefield [placeMineX] [placeMineY] = true;
                mines--;
    }
    cout << "Pick a place to step 0:3 by 0:3 (e.g: 3 1): " << endl;
    int x, y;
    cin >> x >> y;
    if (minefield [y][x]){
                  cout << "BOOM!" << endl;
    } else {
           cout << "Lucky guess... " << endl;
    }
    system (("PAUSE"));
}


When I compile it, it wont show the actual "Minefield" on the screen.
How would I go about making the "minefield" print on the screen so that the user knows where they stepped?

Thanks in advance.
a really basic suggestion could be to replace false and true with 1 and 0, and then cout the matrix values using a nested for loop, and tell the user a 0 is a mine and a 1 is a bomb at the start.
Topic archived. No new replies allowed.