minesweeper

Getting base address of a process

限于喜欢 提交于 2019-12-18 05:15:13
问题 I'm trying to make a program that read the timer value from Minesweeper. (OS is windows 7 64bit) Using cheat engine I found the base address of the variable, but it changes every time I run Minesweeper. What do I need to do to find out the base address automatically? Does it have something to do with the executable base address? Here's my code: #include <windows.h> #include <iostream> using namespace std; int main() { DWORD baseAddress = 0xFF1DAA38;//always changing DWORD offset1 = 0x18;

Program is generating same random numbers on each run? [duplicate]

筅森魡賤 提交于 2019-12-17 07:39:36
问题 This question already has answers here : Why does rand() yield the same sequence of numbers on every run? (6 answers) Closed last year . I just finished coding a Minesweeper type game, and everything's good except for that each time I run the application, it generates the same number (I ran it 3 different times, saved the output to 3 text files and used the diff command in Linux, it didn't find any differences). It's seeded by time(NULL) so it should change every time, right? Here's my code:

Minesweeper Action Events

倾然丶 夕夏残阳落幕 提交于 2019-12-17 02:51:27
问题 Is there a way to make certain event actions specific to left and right mouse clicks? I'm creating a minesweeper gui, so when a square is left-clicked it will be uncovered, & when it's right-clicked it will be flagged. I wasn't sure how to syntactically check for this & couldn't find it on the tut. Thanks for the help! 回答1: I decided to give it a go, to try to create a simple Mine Sweeper application, one without a timer or reset (yet), but that is functional and uses both a GUI cell class

Capture simultaneous right and left click event triggers on label

空扰寡人 提交于 2019-12-11 10:27:12
问题 I'm writing a simple minesweeper game over my Christmas break and I'm adding in the feature where you click with both mouse buttons on a number and it unveils the hidden boxes around it when it's safe to do so. ie the number is a 1 and you've flagged 1 mine, so it uncovers all other boxes next to the 1. Quick side note: I love that minesweeper is a tag. I have a mouse click event on the label, but there is no "Both right and left buttons together" option for System.Windows.Forms.MouseButtons

Minesweeper reveal nearby tiles function

流过昼夜 提交于 2019-12-10 23:09:17
问题 I am trying to make the blank or "0" function of ms in a web page. The goal: what happens in mine: what should happen: the red square indicates the button that was clicked, and the green circles indicate its adjacent squares/tiles. My approach or logic to make this function was: step1: if the button that was clicked is a 0, reveal its adjacent tiles. step 2: for every adjacent tile, if THAT tile is 0, reveal THAT TILES' adjacent tiles. and so on until all adjacent tiles of every connected 0

Minesweeper board labels (beginner level)

守給你的承諾、 提交于 2019-12-08 11:01:59
问题 We were given a homework, where we get a sample minesweeper-like board, with blank spaces instead of numbers (board is in [String] form) and already placed mines. What we need is to create a function, that replaces all blank spaces with numbers, which are equal to number of adjecent mines. I was unable of making any real progress, except for removing all spaces with zeroes, which is probably not even useful in any way. I also had a problem with zeroes being of Char type, which made me unable

Minesweeper stackoverflowerror

限于喜欢 提交于 2019-12-08 04:55:20
问题 Im writing a method for minesweeper that opens a cell if there is no mine there. If there are no adjacent cells next to mines, it opens the cells around it that do not have mines. I regularly have this error: Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError This is my source code: public void open(int row, int col) { // row = vertical index of the matrix // col = horizontal index of matrix unclicked--; butt[row][col].setEnabled(false); // disable the called button if (aray

How can I find the data structure that represents mine layout of Minesweeper in memory?

和自甴很熟 提交于 2019-12-04 07:19:46
问题 I'm trying to learn about reverse engineering, using Minesweeper as a sample application. I've found this MSDN article on a simple WinDbg command that reveals all the mines but it is old, is not explained in any detail and really isn't what I'm looking for. I have IDA Pro disassembler and the WinDbg debugger and I've loaded winmine.exe into both of them. Can someone provide some practical tips for either of these programs in terms of finding the location of the data structure that represents

What's the algorithm behind minesweeper generation

為{幸葍}努か 提交于 2019-12-03 07:11:54
问题 Well I have been through many sites teaching on how to solve it, but was wondering how to create it. I am not interested much in the coding aspects of it, but wanted to know more on the algorithms behind it. For example, when the grid is generated with 10 mines or so, I would use any random function to distribute itself across the grid, but then again how do I set the numbers associated to it and decide which box to be opened? I couldn't frame any generic algorithm on how would I go about

How can I find the data structure that represents mine layout of Minesweeper in memory?

和自甴很熟 提交于 2019-12-02 13:48:46
I'm trying to learn about reverse engineering, using Minesweeper as a sample application. I've found this MSDN article on a simple WinDbg command that reveals all the mines but it is old, is not explained in any detail and really isn't what I'm looking for. I have IDA Pro disassembler and the WinDbg debugger and I've loaded winmine.exe into both of them. Can someone provide some practical tips for either of these programs in terms of finding the location of the data structure that represents the mine field? In WinDbg I can set breakpoints, but it is difficult for me to imagine at what point to