Several methods of program assistance

zhaozj2021-02-16  55

Several methods of program assistance minesweeping 2003.9.6

My hand is very stupid, I am not afraid of everyone joke, digging mines never low 140 (starting from Windows3.1), so sometimes I want to be a program "auxiliary". Here are several ways you think.

Method 1: Let the program dig for us

First manually dug a "empty", then launch our program, read the Window interface of the mine program, then make simple image extraction, extract all numbers in the empty space, design a algorithm which blocks below There is mine, with this to the mine-mine WINDOW mouse message (left, right click), watching a piece of mine-sweeping interface, until it must be manually "Mong", manual intervention. If the algorithm is written, it may be slow (but it is much more exciting than I.). A few days ago, I saw such a program written by Java on the Tsinghua BBS, and the specific location could not remember.

Method 2: Open the landlore, we can dig

After starting the minesweight program, start our program, then do two things: First, put the windows of the mineprogram to transparent (the alpha value is slightly greater than 0, can only be on Win2K, XP), make our program into an interface Like the mine, but it is opaque, then put it behind the WINDOW of the mine procedure. Second, read internal data from the process address of the mine procedure, get the location of each mine, then display on the interface of our program, haha, if it feels that the landmines have been opened, we only have to mad spot mine procedures. The place where mines can be. There is an article on the 9CBS how to get map data from the mine process: http://www.9cbs.net/develop/Article/19/19921.shtmhttp: //expert.9cbs.net/expert/topic/2188/2188775. XML? Temp = .1479456

Method 3: The program opens the map own

Our program acquires map data from the mine process, then send a bunch of mouse messages to the WINDOW of the mine procedure (left, right click), and dig all mines directly. It is estimated that it will be very fast, but it is not a fun.

Method 4: Male

Our program acquires map data from the minesweeper process, then generates the results interface (bitmap) that mine has been fully excavated, and then writes the bitmap to the DC of the WINDOW of the mine program. What is the result? Is the mine that mine has all been excavated if the mouse point is full, and the timer is still jumping?

Method 5: Stop timer

This is a method I have actually done. When our program runs, put in a message hook to the system, change the WM_Tim_timer of the mineprint, want to start the timing. In this way, I can judge the mine, but I don't have to worry about the timer, but I found that the mine reduction became a mathematical judgment within 10.

Method 6: Let the sweeping procedure to dig himself

When our program runs, replace a break code of the mine-mine process or put it in a hook. As a result, the map is all dug when you click on the small yellow face. I just guess this method, there is no practical experience, only can be estimated.

转载请注明原文地址:https://www.9cbs.com/read-24699.html

New Post(0)