threedaymonk / battleship Goto Github PK
View Code? Open in Web Editor NEWLRUG Ruby Fight Club for October
LRUG Ruby Fight Club for October
This is probably intentional, but... in the official, super-serious Rules of Battleship (http://www.hasbro.com/common/instruct/BattleShip_(2002).PDF), a hit on a ship is announced to one's opponent as, e.g., "Hit. Destroyer," and a hit which results in a ship sinking is also announced as such. Since the battleship game here doesn't include any such announcement, players will need to determine from the state of the board whether or not a given ship has been sunk. This has implications for search and placement strategies, so I wanted to check it was intentional before nailing my colours to the mast. (So to speak!)
Been running & interrupting the player server while testing my player. ctrl+c
doesn't always stop the drb instance, causing Address already in use
exceptions.
/Users/bm5k/.rvm/rubies/ruby-2.1.0-p0/lib/ruby/2.1.0/drb/drb.rb:879:in `initialize': Address already in use - bind(2) for "0.0.0.0" port 4433 (Errno::EADDRINUSE)
from /Users/bm5k/.rvm/rubies/ruby-2.1.0-p0/lib/ruby/2.1.0/drb/drb.rb:879:in `open'
from /Users/bm5k/.rvm/rubies/ruby-2.1.0-p0/lib/ruby/2.1.0/drb/drb.rb:879:in `open_server'
from /Users/bm5k/.rvm/rubies/ruby-2.1.0-p0/lib/ruby/2.1.0/drb/drb.rb:764:in `block in open_server'
from /Users/bm5k/.rvm/rubies/ruby-2.1.0-p0/lib/ruby/2.1.0/drb/drb.rb:762:in `each'
from /Users/bm5k/.rvm/rubies/ruby-2.1.0-p0/lib/ruby/2.1.0/drb/drb.rb:762:in `open_server'
from /Users/bm5k/.rvm/rubies/ruby-2.1.0-p0/lib/ruby/2.1.0/drb/drb.rb:1373:in `initialize'
from /Users/bm5k/.rvm/rubies/ruby-2.1.0-p0/lib/ruby/2.1.0/drb/drb.rb:1664:in `new'
from /Users/bm5k/.rvm/rubies/ruby-2.1.0-p0/lib/ruby/2.1.0/drb/drb.rb:1664:in `start_service'
from /Users/bm5k/projects/bm5k/battleship/bin/player_server.rb:32:in `initialize'
from /Users/bm5k/projects/bm5k/battleship/bin/player_server.rb:56:in `new'
from /Users/bm5k/projects/bm5k/battleship/bin/player_server.rb:56:in `block in <main>'
from /Users/bm5k/projects/bm5k/battleship/bin/player_server.rb:59:in `call'
from /Users/bm5k/projects/bm5k/battleship/bin/player_server.rb:59:in `<main>'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.