53f6c5f74d5d633fa5e5c7560ee7462f6f32c95c
5 # Play one move of a Cartagena game
9 # Game state file read on STDIN
10 # Move produced on STDOUT
16 # To change this template, choose Tools | Templates
17 # and open the template in the editor.
20 require 'libcartagena'
24 game
, moves
= Game
.read_game(gamelines
)
25 possibles
= game
.possible_moves
26 move
= possibles
[rand(possibles
.length
)]
27 puts move
.format(game
.board
, true)