reedlaw / ruby-mmo

Ruby MMO: massively multiplayer online programming challenge
274 stars 102 forks source link

I know I said I'm done #75

Closed ghost closed 12 years ago

ghost commented 12 years ago

I couldn't resist adding a bot net that would not be susceptible to infiltration. Unlike @DanKnox's command and control structure my bot net is resistant to infiltration. There is no way to set targets and identify as a friend even after looking at my code unless the player knows all the passwords. I was tempted to implement some complex kind of encryption/decryption scheme for sending messages but I figured xor would be enough.

reedlaw commented 12 years ago

Impressive. And I thought this challenge would progress into an AI competition. Instead it's become all about trying to protect Ruby objects and methods.

reedlaw commented 12 years ago

I'm getting an occassional error:

/home/reed/play/ruby-mmo/players/secure_bot_net.rb:48:in `block (4 levels) in <top (required)>': undefined method `<=' for nil:NilClass (NoMethodError)
ghost commented 12 years ago

I think I fixed the error. I'm not sure what's going on with the line that causes the error.

DanKnox commented 12 years ago

Very nice work @davidk01. Storing the secret keys in a binding that is inaccessible to anyone else after your modules are defined is very clever. It looks like you also cleaned up the structure of the code a bit as well. Well done.

ghost commented 12 years ago

Thanks. I was thinking of making @target inaccessible as well so that the only infiltration vector would be to redefine one of my methods but I figured I'd leave that as an exercise for the reader.