 |
|
 |
Awsome game. It would be great for linux users who remember and liked MineSweeper.
I would like to wrap your file up into a .deb package which will then install onto Ubuntu Linux. The problem is that I'm learning how to add .debs to add/remove programs and asking a user to veryify that they have read, understand and agree to the CPOL will be inconvenient for them and ugly looking. In addition to this, Ubuntu doesn't like to accept packages with any other license agreement than the GNU General Public license agreement. May I use the GNU General Public license agreement instead. A copy of it is available for you to read at the following web address:
http://www.gnu.org/copyleft/gpl.html
modified on Sunday, November 9, 2008 4:18 PM
|
|
|
|
 |
|
 |
Really excellent work!
But theres one problem in the code,
It causes assertion failure if i choose options from Game menu in debug mode.
in CXMineSweeperDlg::Draw() method you used CDC *pDC = GetDC()
but instead ReleaseDC(pDC) you used pDC->DeleteDC();
This is what causing assertion failure in debug but works fine in release.
Correct me if i am wrong and repost the source code if possible.
|
|
|
|
 |
|
 |
great job.
still if you ever try to play winmine at the expert level - you notice that it can take a long time before you have a situation from which you can start playing.
to solve this - i made a slight improvement where - instead of just making sure the first selected cell is not a mine - i make sure it's in a free area - so that after clicking 1 cell - you can always start really playing.
the code is very crude:
i added 2 functions:
int X, X1, Y, Y1;
void CMineSweeper::SetFreeRect(CPoint pPoint)
{
X = pPoint.x - 1;
X1 = X+4;
Y =pPoint.y - 1;
Y1 = Y+3;
}
bool CMineSweeper::IsInFreeRect(int x, int y)
{
if(x >= X && x <= X1 && y >= Y && y <= Y1)
return true;
return false;
}
after the first cell is selected - i call the SetFreeRect function.
and then (in void CMineSweeper::Initialize(CPoint point)) i changed this line:
if( pCell->tType == CELL_TYPE_CLEAR && (x!=point.x && y!=point.y) )
into this line:
if( pCell->tType == CELL_TYPE_CLEAR && !IsInFreeRect(x,y) )
thanks
Elad
elad
|
|
|
|
 |
|
 |
Is there any way to look into resource files of exe??
Nasir
|
|
|
|
 |
|
|
 |
|
 |
Yeah, there is! That is what I did.
There is a lot of tools on the internet that can extract the resources of any EXE file for you (Reshacker for example). But why search? You can extract any resources from an EXE file or even a DLL file using Visual Studio by choosing File->Open(...) then choose the EXE file you want to extract its resources.
Hope You got the idea.
Ahmad Hashem
|
|
|
|
 |
|
 |
Thank u soo much for ur help..i tried in a way that u said..it opens perfectly..but i am not able to copy those resources to other projects resource..why??
Regards
Nasir
Nasir
|
|
|
|
 |
|
 |
Hey, I like the game a lot. I was wondering how difficult it would be to change the size of the squares. I want to make them larger so that the game can be played on a touchscreen (800x600 screen, buttons should be 3 times bigger...)
Any ideas?
|
|
|
|
 |
|
 |
Hi
Look man, I developed this game long time ago based on the same ideas that MS used when developed it.
All the bitmaps here are static size. But else, we can adjust the game to get the size of the screen when loaded and auto fit the size of the button with the same number of buttons on the screen. This can be easily done as long as the larger bitmaps exists !
Ahmad Hashem
|
|
|
|
 |
|
 |
The executable file works fine.
can i know how to compile the source code?
which source file do i have to compile and execute?
|
|
|
|
 |
|
 |
Since, this is a Visual C++ project developed by Visual Studio.NET 2003, you should have it installed. Then, Open the solution file "XMineSweeper.sln" or the project file "XMineSweeper.vcproj", then choose to build the whole project, If I understood what you meant.
Ahmad Hashem Sayed Mostafa
|
|
|
|
 |
|
 |
I'm currently only using Visual C++ 6.0
How do I get it to compile and execute in VC++ 6.0 instead
of Visual Studio.NET 2003?
Thanx.
|
|
|
|
 |
|
 |
Then, I think it needs some tweaking.
You can make new MFC project -> Dialog Based (with the same name as "XMineSweeper"), then delete all files in the project, then add all the *.cpp, *.h and *.rc files and copy the "res" folder to the same location of this new project. I believe this should work.
Ahmad Hashem Sayed Mostafa
-- modified at 16:53 Friday 17th March, 2006
|
|
|
|
 |
|
 |
Hello lyhlyh,
In the tools section here at CodeProject there is a project converter from VC7 to VC6. I've tried it and works fine.
Sorry I don't include the link, but it sholud be easy to find.
Hope this helps.
Cheers,
Homero De la Garza
|
|
|
|
 |
|
 |
It would be helpful if you would include the "res" folder. Missing icon, and bitmaps.
Old dog learning new tricks!
|
|
|
|
 |
|
 |
Oh, Sorry about such a silly mistake of me, I have just updated the source to include the needed resources, hope be helpful
Ahmad Hashem Sayed Mostafa
|
|
|
|
 |
|
 |
al salam alikom
dear ahmed i hope you got the job sakhr is one of the best software companies
if you can tell us about its interview what type of questions they ask and other assignment
thanks in advance
MCAD
|
|
|
|
 |
|
 |
Look Mohamad, I am now at Sakhr, It was very easy & straightforward, Sakhr was interviewing with all my graduated colleagues from FCIS(www.fcisainshams.net), but the assignment was just a simple way to know that you are in VC++. That's all, but for my advice, try to improve your self and get the way to Microsoft, and when done, send your CV at egyptres@microsoft.com where the way begins like meshref : http://mmeshref.blogspot.com
By the way, I don't know you!, who are you then?
Ahmad Hashem Sayed Mostafa
|
|
|
|
 |
|
 |
Thanks ahmed for your reply and info i actually don't search for a job at sakhr i wanted this some year ago but they usually requierd engineers and computer science graduated
and this not my case -business administration- and i'm mainly C# developer so i never sent my c.v to them
i asked you this question because one of my interest to know how the distinguished companies select thier employees MS,Google and in its field sakhr
so my congratulations for the job and thanks for the info
MCAD
|
|
|
|
 |
|
 |
Oh boy, fantastic piece of programming, you're really coding as a professional.
But I couldn't try the game as I have migrated to linux, can you develop a java version for me?!
Ashraf Sabry
|
|
|
|
 |
|
 |
Look lol, I know the decision to migrate to Linux was your choice, then you should continue your way alone and try to get all done for you. In other words, in Arabic, "hez tolak keda w e3melha", It will not take you one day, you were born to be a code GURU as they say.
Ahmad Hashem Sayed Mostafa
|
|
|
|
 |
|
 |
I've already solved most of my problems with Linux, but still I think that Windows XP is far better than any Linux distribution (this may make the GNU/Linux people angry of me).
My suggestion to make a Java version was just a joke that didn't deserve your offensive slang reply.
Linux has a program called wine whose function is to run Windows programs. I used it to run your game.
At last I'd like to ask the administrators to ommit the name and the link to Ahmad's company, as this site is not a place for publishing unpaid advertisements!
|
|
|
|
 |
|
 |
OK, Eng.Ashraf, I agree with you, this is not a place of unpaid advertisement, then look around you, you can see that it is not an edited article, doesn't the author of an article make just a small advertisement about himself/herself? but any way, I meant by this slang reply to encourage you to submit one of your works you've made here in codeproject, to make help people.
Ahmad Hashem Sayed Mostafa
|
|
|
|
 |
|
 |
good job man!!
i haven't examine the code yet but there is a bug in the game...
1- in the custom mode you should make sure that number of mines is less than number of cells, because i have entered a big number of mines that exceed the number of cells and when i tried to play the game hang
2- the dialog box that pop up when i make a new high score is framless
thnx
Khaled
it is never too late.
|
|
|
|
 |
|
 |
First, thanx to be the first to comment ( or actually found a bug) on my first article on Codeproject . It is so nice from you.
Any way,
1. I fixed the problem you discoverd in the custom game dialog to check for number of mines againts width & height.
2. I have made the name dialog to be frame enabled instaed of being frameless although I intended to make it frameless, but changed it for you.
Ahmad Hashem Sayed Mostafa
|
|
|
|
 |