reedlaw / ruby-mmo

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

Add player that avoids getting chosen as a target. #25

Closed smerritt closed 12 years ago

smerritt commented 12 years ago

The basic idea is that most players have code that looks like this:

others = Game.world[:players].select { |p| p != self }

This player just defines == so that it's always true for any PlayerProxy, and so the other players pretty much skip over it. :)

According to the letter of the rules, this is not a cheater since it's not tweaking anybody else's ivars or methods. On the other hand, defining == like that is pretty damn fishy, so it's your call. ;)

reedlaw commented 12 years ago

This player should be considered a cheater (need to put no method overrides in the rules), but even with the sneaky bit this player doesn't come out on top overall, so I'll leave him.