Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Hellpppp
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mk2000




PostPosted: Wed Dec 30, 2009 12:35 pm   Post subject: Hellpppp

im trying to make a battleship game. i fairly new at turing. but i need to some clue where to start. im lost!!!
Sponsor
Sponsor
Sponsor
sponsor
syntax_error




PostPosted: Wed Dec 30, 2009 9:36 pm   Post subject: RE:Hellpppp

Paper and pen?

A flowchart of some sorts, then how you want to make the 'battle field' exactly a 2D boolean array of some sorts?

Put up some code as where you heading and how you want to get there, then someone may help.
Tony




PostPosted: Wed Dec 30, 2009 9:40 pm   Post subject: Re: RE:Hellpppp

syntax_error @ Wed Dec 30, 2009 9:36 pm wrote:
2D boolean array of some sorts?

There are four states though: empty, ship, miss, hit.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
syntax_error




PostPosted: Wed Dec 30, 2009 9:52 pm   Post subject: RE:Hellpppp

Ah, true; still doesn't matter, have the empty or loaded with a ship as the boolean array and the hit and miss as (x,y) coordinates the user enters to check against the array.

I would keep each ship as a list and again give true or false values for hit and miss to check for how much of the ship is lost.
Tony




PostPosted: Wed Dec 30, 2009 11:41 pm   Post subject: RE:Hellpppp

perhaps you should let mk2000 decide on this choice Smile
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
ecookman




PostPosted: Thu Dec 31, 2009 11:10 am   Post subject: RE:Hellpppp

If i remember correctly there was a battle ship game that was already made on this website, if you can find it, you can see what the code is and how to start from there.

not steal it.


Personally I find learning from code to very helpful. Faster than pencil and paper, and I also can sometimes find ways to improve the already written code and find spots where I would rather do this from that. Then with those ideas in mind I rebuild the program to fit my criteria from scratch.
Not only does this help with learning code faster, it also improves your ability to read and understand different coding styles and the code in general!

(in my opinion)
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: