Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (37 sloc) 1.33 KB
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe "Finchbot" do
before do
params = YAML.load(File.read(File.join(File.dirname(__FILE__), '..', 'parameters.yml'))).with_indifferent_access
@bot = Finch::Bot.new(params)
state = "P 11.6135908004 11.6587374197 0 119 0
P 1.2902863101 9.04078582767 1 100 5
P 21.9368952907 14.2766890117 2 100 5
P 5.64835767563 18.2659924733 0 21 4
P 17.5788239251 5.05148236609 0 21 4
P 0.0 17.5664628114 0 32 2
P 23.2271816008 5.75101202793 0 32 2
P 15.9964071303 22.4925373322 0 60 5
P 7.23077447046 0.824937507164 0 60 5
P 12.096860926 23.3174748393 0 74 5
P 11.1303206747 0.0 0 74 5
P 5.90572926007 2.48227346488 0 85 1
P 17.3214523407 20.8352013745 0 85 1
P 18.2860133478 0.765777669475 0 72 3
P 4.94116825299 22.5516971699 0 72 3
P 20.1067105381 18.0593851211 0 9 5
P 3.12047106262 5.25808971821 0 9 5
P 4.594838746 13.7860000656 0 69 2
P 18.6323428548 9.5314747737 0 69 2
P 8.80119206169 20.0157034284 0 41 1
P 14.4259895391 3.30177141098 0 41 1
P 19.4667873213 20.0561682576 0 35 5
P 3.76039427948 3.26130658173 0 35 5
go"
@pw = PlanetWars.new(state)
end
describe "angled strategy" do
it "should complete it's turn" do
@bot.do_turn(@pw).should == true
end
end
end
Jump to Line
Something went wrong with that request. Please try again.