C# GAME    BattleShips

kensy11
kensy11 used Ask the Experts™
on
Hello,

i am trying to make a game in c#     BattleShips

i have made the layout ...

I want the ship to come on the left side (the name of them and ) for example

OceanMaster is one of my ships

so when the game start i want OceanMaster on the left side and between parentheses how mach the ship is been hit
example

parentheses(1)  its been hit and only one pixel is left alive ..

you can download it here
http://vizax.be/BattleShips.zip


thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009

Commented:
Where did you get the code from?...

Anyone who could develop the attached code would know what needs to be done.  Is this homework?
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009
Commented:
I would start with the Ship() class and add two properties:
- Sank() which returns bool
- HitsLeft() which returns int

Figure out the code necessary for those two properties.

Next, start working backwards and figure out the hierarchy of classes that contain Ship and get you out to the Game() class.  At each Class along the way, figure out what changes need to be made to expose the Ships so that you can access them in Game().

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial