Code Search for Developers
 
 
  

socket_support.rb from Thousand Parsec at Krugle


Show socket_support.rb syntax highlighted


def wire_to_hex s
  s.unpack('C*').map {|c| ('0' + c.to_s(16))[-2,2] }.join('').gsub(/..../){|m|m+' '}
end





See more files for this project here

Thousand Parsec

Thousand Parsec is a framework for turn based 4 X\'s game (eXplore, eXpand, eXploit, eXterminate). Designed for long games, supporting massive universes and has an easily expanded tech tree.

Project homepage: http://sourceforge.net/projects/thousandparsec
Programming language(s): C++,Python
License: other

  client.rb
  libtpproto-rb.tailor
  pack.rb
  packet.rb
  socket_support.rb
  test_client_help.rb
  test_server.rb
  wire-demo.rb