summaryrefslogtreecommitdiffstats
path: root/lib/colonial_twilight/player.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/colonial_twilight/player.rb')
-rw-r--r--lib/colonial_twilight/player.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/colonial_twilight/player.rb b/lib/colonial_twilight/player.rb
new file mode 100644
index 0000000..16e0b04
--- /dev/null
+++ b/lib/colonial_twilight/player.rb
@@ -0,0 +1,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