Test my Game Please

Pages: 12
This is the first program that I have created that might be of any "use". It is a simple battleship game that I think I have fixed all the bugs in but I'm not sure. I would simply enjoy for someone to test it and give back any positive feedback such as advice and/or something that needs to be fixed.

Here is the link:
http://dl.dropbox.com/u/67507954/BattleShip.exe

Thanks for playing!

(Also, I posted this in Beginners, idk if I should have posted in General C++ or lounge)
You should probably post the source code and NOT a link to an .exe file. Who wants to try an application with NO knowledge on the app itself? So if you want people to test it truly,then i advice pasting the code instead
well, the programm was displayed as a malware on my computer, so i wont test it sorry (dont know if it was intentional, or not)
I promise it isn't malware but if I were in your shoes I wouldn't download a suspicious program either. I don't know how to get past all antivirus software and broswers from thinking it is a virus. The computer I programmed it on doesn't even like it when I make a copy of the file and run the copy.

I don't really want to post the source code because I don't want just anybody to take my code and claim it as their own (not that it's that great of a prgram, but I put tons of days worth of hours into it)
.exe no source code warning of malware. No thank you, a promise is not good enough.
Might be a good program, but with no source code to confirm sounds pretty suspicious.
Last edited on
as subzero said, a promise that its not malware sadly isnt good enought for me to download. and i for one understand why you havent put up the source code. i wouldn either no matter how crappy the program is, cause i dont like the thought of people stealing it.

im sorry for not being able to try it, i really am. :(
Two choices.

1) Thoroughly test your own software. You know your program better than anyone so, assuming it's a fairly small project, you'd be the best tester for it.

2) Post the code and be done with it. People steal all the time. Not just code, but anything. Words, assets, physical items. People who steal code aren't necessarily going to benefit from it. If it's something like a school project, I would strongly recommend not choosing this option. If you think it's going to be beneficial to your developing your own skills then the odds of someone else stealing it and putting it to use would seem a pretty small overhead.
It is NOT reported as malware, just noted as suspiciuos by Avast at least. For a console style game it looks pretty good although I'm not really a big fan of text based games.
Okay, I give up, here is my embarrasing source code

http://dl.dropbox.com/u/67507954/BattleShip.cpp

Please keep in mind that I am very new to C++ and I probably have at least 5X as many lines of code as I need.
Don't be embarrassed about learning. Everyone starts somewhere.
I tried to run your program but it gives me one error: line 29, 'time' was not declared in this scope
If I remember correctly why I put that there, it is to initialize the randomizer based on what time it is. You can ignore that line with // and the program will run still but it will get repetative I think if you were to run the program multiple times.

the same idea (I think) is used here:

http://www.cplusplus.com/reference/clibrary/cstdlib/rand/
Last edited on
'up' : unreferenced local variable
'letter' : unreferenced local variable
uninitialized local variable 'good' used
'convertint' : not all control paths return a value
all these are warnings but no one likes them in there code
the map for the user not the enemy map is messed up between e and f
Last edited on
why would it compile fine on my compiler on my computer (dev C++ on Windows 7) and not compile an someone else's compiler?
Different compiler, different behaviour, I'm afraid.

The only thing I can suggest is that people post the compiler errors and we'll see if there are workarounds.
Well, one error is srand ( time(NULL) ); on both Timothy's and Catalin's compilers. Is there an alternative for srand ( time(NULL) );?
entry has 3 elements but you are using it as if it has 4 elements.
For those having problem with
error: 'time' was not declared in this scope|
just place the header file... #include <time.h>
thanks AMCerasoli
@Peter87

nice catch. I'm trying to fix it but this doesn't work for some reason:

1
2
if ((entry[1] == '%') || (entry[2] != ' '))
                    valid = false;


even though entry[2] == ' ' it is behaving like it doesn't and valid becomes false :(
Pages: 12