Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pamput/lab-battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amazing Battleship!

Compile

gradle clean distzip

How to run

To run a simple test:

battleship

To run your own script:

battleship input.txt

To run your own script and save it in a file:

battleship input.txt output.txt

Script

Inline comments are supported. The application also skips blank lines and useless spaces.

Input:

  10                      // Size of the board is 10x10
  (0, 0, N) (9, 2, E)     // 2 ships in different locations
  (0, 0) MRMLMM           // move/rotate the ship located at (0, 0)
  (9, 2)                  // shoot at (9, 2) and sink the ship if there is one

Output:

  (1, 3, N)
  (9, 2, E) SUNK

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages