Page 1 of 1

Minesweeper -> Dlotan ;)

Posted: April 14th, 2012, 10:04 pm
by Dlotan
HereĀ“s my Minesweeper with Sourcecode

Use space to open a field

Use Enter to set a flag

Use Arrow Keys to navigate

Report bugs in this Thread

Hope u enjoy

Dlotan ;)

edit: coz i dont had that much time to get known of all the colors:

there are defines in the game.h where u can change the colors

source code is in my second post

Re: Minesweeper -> Dlotan ;)

Posted: April 15th, 2012, 3:53 am
by chili
This is very well made Dlotan, thank you for sharing! Nice touch using domino dots for the numbers. Much easier than hand coding sprites for each number digit. :lol:

I hope you don't mind me featuring this in the next video. 8-)

I think there might be a bug here though...

Take a look at the bottom left corner in this screenshot.
bug.gif
bug.gif (5.89 KiB) Viewed 4325 times

Re: Minesweeper -> Dlotan ;)

Posted: April 15th, 2012, 12:47 pm
by Dlotan
Thanks for reporting chili

seems like i messed a + and a - up

i did

Code: Select all

//btm-right
if(y + 1 <= PROSPALTE + 1)
{
	if(field[x + 1][y + 1].mine == TRUE)
	{
		field[x][y].minesnextto++;
	}
}
instead of

Code: Select all

//btm-right
if(y + 1 <= PROSPALTE - 1)
{
	if(field[x + 1][y + 1].mine == TRUE)
	{
		field[x][y].minesnextto++;
	}
}
edit: I updated it so everything works fine now. U can change many things in the defines now such as coloms rows... hight of the whole field... number of mines... colors of everything. Also i uploadet now like ur rules say

Would be a honor to get featured ofc :D

Re: Minesweeper -> Dlotan ;)

Posted: April 17th, 2012, 2:46 pm
by chili
Hey Dlotan, I just took a look at your source code. Very nicely laid out and easy to understand! Both the formatting and the structure of the code itself is well-made. Very nice work indeed. 8-)

Re: Minesweeper -> Dlotan ;)

Posted: April 17th, 2012, 6:48 pm
by Dlotan
Thanks a lot Buddy ;)