Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Minesweeper

Name: Anonymous 2010-04-14 3:46

HALP!

Last year I wrote this program in VC++ that would analyze and automatically solve minesweeper boards in Windows XP.  It could/can solve expert boards in 1-2 seconds unless it hit a board configuration that it couldn't make progress on (though you can set it to guess randomly).

Now I want to modify it for Vista, but they completely changed the look of Minesweeper.  So where in the XP version, there were about 16 different colors used total in the entire game and it was easy to tell what type of square you were looking at by polling one strategically chosen pixel, the colors in the Vista version vary from square to square (see: http://i44.tinypic.com/28718ps.jpg).

The only challenge is to figure out a way to determine the type of square (unclicked, flagged, clicked with a "1", clicked with a "2", etc.) accurately and quickly enough to not bog down the program.  Everything else about the program can stay basically the same.

I thought of using the relative "darkness" of squares, since unclicked squares are darker, but looking at the actual RGB values shows that unclicked squares in the upper left corner can actually be darker than clicked squares in the lower right.

wat do?

Name: Anonymous 2010-04-14 5:59

The color (hue? whatever) seems to depend only on the taxi-cab distance of the square from the top left (i.e. squares on the same diagonal lines have the same colors).  Maybe you can figure out exactly how it varies and standardize the RGB value using the square's position on the board.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List