Trying to get a Battleship Program ASAP
Trying to get a Battleship Program ASAP
Hey there guys, new to the forums. I am currentyl in High School, and taking a computer programming class, where we use qbasic. I have been working with it for almost 2 months now, and starting to get it.
The thing is though, I have a battleship program due in like three days, and all my assignments are stacking up!
If somebody could write a qbasic program that has battleship, I would be so appreciative! All it needs to include is three ships, and end when the battleship is sunk. Shiplengths are 2, 3, 4 (the battleship being 4)
Thanks again if anybody takes this up, and if they do ,I would gladly write them a program also, just not for like a week!
~Raff
The thing is though, I have a battleship program due in like three days, and all my assignments are stacking up!
If somebody could write a qbasic program that has battleship, I would be so appreciative! All it needs to include is three ships, and end when the battleship is sunk. Shiplengths are 2, 3, 4 (the battleship being 4)
Thanks again if anybody takes this up, and if they do ,I would gladly write them a program also, just not for like a week!
~Raff
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Sorry kiddo
Most people will not do homework FOR you. Why?
1) Because your classmates outnumber you and they would probably beat the crap out of you if you got caught
2) You WILL get caught! Your teacher is no fool.
3) Many of us use much more advanced programming methods! Your program would be obvious to others.
4) You should give it a try and see what you come up with. If you have some problems, post the code and ask for help on specific things that you are having problems with.
OK, so far the ships are 2,3 and 4 WHAT? Pixels, inches, text places?
If you don't try, ALL of your ships are sunk!
Ted
1) Because your classmates outnumber you and they would probably beat the crap out of you if you got caught
2) You WILL get caught! Your teacher is no fool.
3) Many of us use much more advanced programming methods! Your program would be obvious to others.
4) You should give it a try and see what you come up with. If you have some problems, post the code and ask for help on specific things that you are having problems with.
OK, so far the ships are 2,3 and 4 WHAT? Pixels, inches, text places?
If you don't try, ALL of your ships are sunk!
Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
- Codemss
- Veteran
- Posts: 124
- Joined: Sun Jun 24, 2007 6:49 am
- Location: Utrecht, The Netherlands
- Contact:
I think you can better start to code fast and hand in some code that is full of bugs, than hand in nothing or hand in someone elses code and get caught.
You can better do your best yourself(that's the only way you'll learn something) or admit to your teacher that you don't got got the time.
Now if you have some problems(in the code, or just things that you don't understand) you can post them here and I'm suree you'll get some good help.
You can better do your best yourself(that's the only way you'll learn something) or admit to your teacher that you don't got got the time.
Now if you have some problems(in the code, or just things that you don't understand) you can post them here and I'm suree you'll get some good help.
Check out my site: <a href="http://members.lycos.nl/rubynl">Click here</a>
Hope you like it. Send some feedback if you want: <a href="mailto:basicallybest@live.nl">Mail me</a>
Codemss, before known as RubyNL
Hope you like it. Send some feedback if you want: <a href="mailto:basicallybest@live.nl">Mail me</a>
Codemss, before known as RubyNL
I won't give you the code, but I'll give you some hints.
A) Use a matrix for the board
B) Use different numbers for different states (ex: 0 is unhit water, 1 is unhit ship square ...)
The rest should fall together.
Now if you have specific questions about certian parts of code and technique, and if your teacher permits, then we may help give hints to debug or optimize some parts of code you have already written.
A) Use a matrix for the board
B) Use different numbers for different states (ex: 0 is unhit water, 1 is unhit ship square ...)
The rest should fall together.
Now if you have specific questions about certian parts of code and technique, and if your teacher permits, then we may help give hints to debug or optimize some parts of code you have already written.
Re: Sorry kiddo
burger2227, no offense to you at all, but that just cracked me up...I got a picture of Raffa turning in some FreeBASIC source that uses pointers, inline assembly, and function overloading...burger2227 wrote:3) Many of us use much more advanced programming methods! Your program would be obvious to others.
pieces of course. 2 hit's for an 2pieced ship to go down etc.OK, so far the ships are 2,3 and 4 WHAT? Pixels, inches, text places?
@Raffa I can't believe that you guys is supposed to do a battleship game without knowledge of the different SCREEN modes. Have your teacher told you to use LINE, PSET and such or just plain ASCII?
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
It's probably an ASCII text game.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Well, ASCII is just text really and you can make a crude boat just using a forward slash and a backslash with some dashes between. That could be done without knowing any ASCII codes!
Instead of all of this bantering and complaining about the teacher, you ought to start doing something. Your description of the game lacks a lot of information. We don't even have a decent idea of the assignment and you have wasted 3 days!
I could have written 3 harder programs in that amount of time! Full speed ahead! Damn the torpedo's!
Instead of all of this bantering and complaining about the teacher, you ought to start doing something. Your description of the game lacks a lot of information. We don't even have a decent idea of the assignment and you have wasted 3 days!
I could have written 3 harder programs in that amount of time! Full speed ahead! Damn the torpedo's!
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Have you checked the tutorials section here? There's all kinds of tutorials that will help. I wouldn't bother with the ones in the magaizines yet, but the begginers section should be very good for you.
But you don't know about Pset? I learned Pset before Print (I kept on typing Disp, before I figured out the command was Print).
But you don't know about Pset? I learned Pset before Print (I kept on typing Disp, before I figured out the command was Print).
For any grievances posted above, I blame whoever is in charge . . .
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Another one bites the dust! Try C or Cobal programming. It is a lot easier LOL. Thanks for giving up. Now you can look forward to being a Walmart stocker 24 hours a day! But they use computers too!
If you really want to learn, come back. Telling a computer to do something is kinda neat. Once you get the hang of it, you will find that it is the ONLY thing you can control wthout an argument. Errors perhaps, but no divorce settlement LOL.
Ted
If you really want to learn, come back. Telling a computer to do something is kinda neat. Once you get the hang of it, you will find that it is the ONLY thing you can control wthout an argument. Errors perhaps, but no divorce settlement LOL.
Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
Ted Rude? NAHHHHHH !!!
IT's that time of the month for him, you know, PMS (Programmer's Madness Syndrome) ROFLMAO
IT's that time of the month for him, you know, PMS (Programmer's Madness Syndrome) ROFLMAO
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
Graphics
We seem to be stuck on advanced graphics.
What are the specs of this game?
My thought would be to use no SCREEN command but simply use
PRINT "sss" to be an ordinary ship and "BBB" to be a battle ship.
And use LOCATE to place them, and an Array to keep track of where they are.
Are you supposed to fire missiles?
Mac
What are the specs of this game?
My thought would be to use no SCREEN command but simply use
PRINT "sss" to be an ordinary ship and "BBB" to be a battle ship.
And use LOCATE to place them, and an Array to keep track of where they are.
Are you supposed to fire missiles?
Mac
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Sorry if I got carried away
I am just disappointed that he will not try a little harder! Programming isn't for everyone. But trying anything that is hard will make the person more able to deal with bigger problems down the road. Anybody can just throw up their hands and Quit!
I have run into programming problems too! If I just gave up, then I wasted a lot of time. I think we all have had stumbling blocks to get over.
I really think that he was looking for somebody to write it for him. Now that is rude and not fair to the other people in his class.
Mr Bad Box, what does your name connotate to the average person? It does not sound real friendly to me.
Ted
I have run into programming problems too! If I just gave up, then I wasted a lot of time. I think we all have had stumbling blocks to get over.
I really think that he was looking for somebody to write it for him. Now that is rude and not fair to the other people in his class.
Mr Bad Box, what does your name connotate to the average person? It does not sound real friendly to me.
Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0