Class: Dat::SimpleBot

Inherits:
Bot
  • Object
show all
Defined in:
lib/dat/bots/simplebot.rb

Instance Method Summary collapse

Methods inherited from Bot

#bot?, #init

Instance Method Details

#moveObject



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.message
end

#to_sObject



14
15
16
# File 'lib/dat/bots/simplebot.rb', line 14

def to_s
  "SimpleBot-#{object_id}"
end