Update connect/disconnect action states.
[kaya.git] / lib / dummy_player.rb
blobab96e6c597fb6ed2bbb8ab0708ba7273b0c22431
1 # Copyright (c) 2009 Paolo Capriotti <p.capriotti@gmail.com>
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 class DummyPlayer
9   include Observer
10   include Player
11   
12   attr_reader :color
13   attr_accessor :name
14   
15   def initialize(color)
16     @color = color
17   end
18   
19   def allow_undo?(player, manager)
20     manager.undo(player, 1, :allow_more => true)
21   end
22 end