blob: 16e0b0444caeb970edc05938c25db1af8ff7f9a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#! /usr/bin/env ruby
# -*- coding: UTF-8 -*-
module ColonialTwilight
class Player
attr_reader :faction
def initialize game, faction
@game = game
@faction = faction
end
def to_s
@faction.to_s
end
def play possible_actions
action = @game.ui.chose( 'Choose an action', possible_actions.values) { |s| a = s.split(':'); a[0] = a[0].yellow; a.join(':') }
puts 'Player.play' # FIXME
return action
end
end
end
|