https://github.com/simonhdickson/erlship
Battleships written in Erlang
https://github.com/simonhdickson/erlship
Last synced: 26 days ago
JSON representation
Battleships written in Erlang
- Host: GitHub
- URL: https://github.com/simonhdickson/erlship
- Owner: simonhdickson
- License: mit
- Created: 2013-02-17T12:42:33.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-03-27T23:21:36.000Z (about 13 years ago)
- Last Synced: 2025-12-26T21:49:41.434Z (6 months ago)
- Language: Erlang
- Size: 129 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
README
ErlShip
=======
Battleships written in Erlang
Easiest way to get this going, load up terminal:
cd(/checkoutLocation).
c(battleship).
To set the game going (where 10 is the size of the grid, and [2,3,5] are the sizes of the ships.)
Game = battleship:game(10,[2,3,5]).
To make a shot:
battleship:shoot(Game, {1,2}).
Have fun!
AI
==
Just added AI support so if you run:
battleship:game().
Two AIs will play each other.
Even though it would be far more useful to be able to play against the AI, that doesn't actually
work... (I just thought it was cooler to have two AIs...)