Skip to content

This is an entry to the Gophercon Coding Challenge held at GopherCon India 2017

Notifications You must be signed in to change notification settings

prashanthpai/battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Battleship

This is an entry to the Gophercon Coding Challenge.

Building and running

$ git clone https://github.com/prashanthpai/battleship
$ cd battleship
$ go build battleship.go
$ ./battleship input.txt output.txt

The result of the game run is printed to stdout and also to the output file.

Sample run:

[ppai@gd2-1 battleship]$ ./battleship input.txt output.txt
Player1
O O _ _ _ 
_ X _ _ _ 
B _ _ X _ 
_ _ _ _ B 
_ _ _ X _ 

Player2
_ X _ _ _ 
_ _ _ _ _ 
_ _ _ X _ 
B O _ _ B 
_ X _ O _ 

P1:3
P2:3
It is a draw

About

This is an entry to the Gophercon Coding Challenge held at GopherCon India 2017

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages