Softsuave interview question

Code the logic for battle ship game