Class: Dat::SimpleBot
Instance Method Summary collapse
Methods inherited from Bot
Instance Method Details
#move ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/dat/bots/simplebot.rb', line 6 def move word = @game.logic.perturb(@game.last, @game.used).sample.to_s @game.play(self, word) word rescue WinningMove => e word << "\n" << e. end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/dat/bots/simplebot.rb', line 14 def to_s "SimpleBot-#{object_id}" end |