On Jan 23, 2005, at 10:43 AM, Jannis Harder wrote: > Bill Atkins schrieb: > >> My 12-line solution has so far won 100% of the time against every >> player I've been able to come up with, even players whose moves are >> completely random. > > > # Start > class HyperCheater < Player > def initialize(opponent) > @opponent=opponent > Object.const_get(opponent).send :define_method, :choose do > :scissors > end > end > def choose > :rock > end > def result( you, them, win_lose_or_draw ) > Object.const_get(@opponent).send :define_method, :choose do > :scissors > end > Object.const_get(self.class.to_s).send :define_method, :choose > do # SelfRepair > :rock > end > end > end > END Protecting yourself, eh? That looks like a challenge. Anyone want to out cheat this cheater? It can be done! James Edward Gray II