mine-sweeper | A simple mine sweeper by csharp
kandi X-RAY | mine-sweeper Summary
kandi X-RAY | mine-sweeper Summary
A simple mine sweeper by csharp.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mine-sweeper
mine-sweeper Key Features
mine-sweeper Examples and Code Snippets
Community Discussions
Trending Discussions on mine-sweeper
QUESTION
I am currently writing a mine-sweeper program. There is a function which is connected to a menu. When users click on the menu of "Level", the program will show a submenu of several different levels (which means a different number of blocks). I have only defined "SetNovice" function now but found an issue that the mines won't be randomly distributed again as what constructor does(which is binding the buttons with "ButtonOnClicked" function to set the mines).
In SetNovice, I first call "RemoveChild()" function to remove btn on the GUIPanel, then delete the array "MineField", and then create btn and MineField again as what constructor does, nut the mines are just not there. The mines should be set when calling "ButtonOnClicked" function. As I wrote in SetNovice when creating btn, I did "Bind" btn to ButtonOnClicked, but no mines are set.
The program is supposed to randomly reset the mines when SetNovice is invoked, but it turns out not doing so. Why?
"MineField" is an array of integers in which "-1" is where mines are. But I'm not sure why in "SetNovice" function when I try to remove the original MineField to resize to a new one, the function to which buttons are bound to won't set the mines.
Below is my GUIWindow.h
...ANSWER
Answered 2020-Dec-14 at 21:33Try adding
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mine-sweeper
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page