Sha256: c497bef183cff9ef4e6a0f9095717af15a6d4e500e49a64d73b90f03ab3ac23e
Contents?: true
Size: 792 Bytes
Versions: 1
Compression:
Stored size: 792 Bytes
Contents
#!/usr/bin/env ruby require "game-tictactoe-alu4078" if __FILE__ == $0 if (ARGV.size == 2) player1 = case ARGV[0].downcase when "smart" then Tictactoe::SmartPlayer when "minimax" then Tictactoe::MinimaxPlayer when "dumb" then Tictactoe::DumbPlayer when "human" then Tictactoe::HumanPlayer else Tictactoe::HumanPlayer end player2 = case ARGV[1].downcase when "smart" then Tictactoe::SmartPlayer when "minimax" then Tictactoe::MinimaxPlayer when "dumb" then Tictactoe::DumbPlayer when "human" then Tictactoe::HumanPlayer else Tictactoe::HumanPlayer end game = Tictactoe::Game.new(player1, player2, false) game.play else puts "Usage: ruby -Ilib bin/tictactoe_game_players.rb player_x player_o" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
game-tictactoe-alu4078-0.0.2 | bin/tictactoe_game_players.rb |