![]() |
DOS Minesweeper
Printing the grid works, and in general the array structures and everything updates as it should, random mines are generated; but no matter which square you choose, it CHANGES that square to a mine then says you lose cause you selected a mine; even if it wasnt originally a mine
i have narrowed it down to the bolded function; again, initially about 30% of the squares are mines, and when you click on a mine it works properly, when you select a mineless square it changes it to a mine and says you lose, when it should just continue the game (ill implement neighbor function later once this works) :
#include<iostream>edit: the only reason the paint() function prints the mine value of each square was for testing to see which squares were mines... |
Your if and else are using assignment ( = vs == ).
|
thank you
|
| All times are GMT -5. The time now is 2:36 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC