Use two dimensional array in map

This commit is contained in:
Anton Vakhrushev
2019-10-10 16:20:20 +03:00
parent 34cf40a099
commit 55f9bad188
4 changed files with 34 additions and 28 deletions

View File

@ -4,7 +4,7 @@ require "../src/game/world"
describe "World" do
it "should build crystal harvester" do
world = Game::World.new
point = Game::Point.new(2, 3)
point = Game::Point.new 2, 3
cmd = Game::BuildCrystalHarvesterCommand.new(point)
world.push(cmd)
world.run(100)
@ -13,7 +13,7 @@ describe "World" do
it "should fail when not enought resources" do
world = Game::World.new
point = Game::Point.new(2, 3)
point = Game::Point.new 2, 3
cmd = Game::BuildCrystalRestorerCommand.new(point)
expect_raises(Game::NotEnoughtResources) do
world.push(cmd)