swarm 0.1.0.0 → 0.1.0.1
raw patch · 9 files changed
+58/−42 lines, 9 files
Files
- CHANGELOG.md +13/−0
- data/scenarios/Challenges/Mazes/loopy_maze.yaml +1/−1
- data/scenarios/Challenges/hanoi.yaml +4/−4
- data/scenarios/Tutorials/crash.yaml +2/−2
- data/scenarios/Tutorials/farming.yaml +2/−2
- data/scenarios/Tutorials/move.yaml +29/−29
- src/Swarm/Game/Step.hs +5/−2
- src/Swarm/Version.hs +1/−1
- swarm.cabal +1/−1
CHANGELOG.md view
@@ -1,5 +1,18 @@ # Revision history for swarm +## **0.1.0.1** - 2022-10-06++A bugfix release for a few minor bugs that plagued the first release:++- Fall back to to the swarm data directory when a `run` file is not+ found ([#730](https://github.com/swarm-game/swarm/pull/730))+ - This bug caused the move tutorial to be unplayable because it tried to execute+ `run "data/scenarios/Tutorials/move_system.sw"`+- Fix version check when there is no GitInfo+ ([#729](https://github.com/swarm-game/swarm/pull/729))+ - This bug caused the game to always report that there was a new+ version available even when you already had the latest (and only!) version.+ ## **0.1.0.0** - 2022-10-06 First Swarm release! Swarm already has:
data/scenarios/Challenges/Mazes/loopy_maze.yaml view
@@ -18,7 +18,7 @@ return (not b) } { return false } solution: |- run "data/scenarios/Challenges/Mazes/loopy_maze_sol.sw"+ run "scenarios/Challenges/Mazes/loopy_maze_sol.sw" robots: - name: base dir: [0,1]
data/scenarios/Challenges/hanoi.yaml view
@@ -17,7 +17,7 @@ z <- ishere "blocked three"; return (x && y && z) solution: |- run "data/scenarios/Challenges/hanoi-solution.sw"+ run "scenarios/Challenges/hanoi-solution.sw" robots: - name: base dir: [0,-1]@@ -62,7 +62,7 @@ // 1. place noth of me is NOT empty // then // - lock X- run "data/scenarios/Challenges/hanoi-invariant.sw"+ run "scenarios/Challenges/hanoi-invariant.sw" - name: increasing dir: [0,0] system: true@@ -79,7 +79,7 @@ // - place "OK" // else // - try to grab "OK"- run "data/scenarios/Challenges/hanoi-increasing.sw"+ run "scenarios/Challenges/hanoi-increasing.sw" - name: count dir: [0,0] system: true@@ -94,7 +94,7 @@ // count all entities placed in columns // the final count should be either 2 or 3 // place "two" or "three" at x=0 y=-6- run "data/scenarios/Challenges/hanoi-count.sw"+ run "scenarios/Challenges/hanoi-count.sw" entities: - name: bottom tee display:
data/scenarios/Tutorials/crash.yaml view
@@ -33,7 +33,7 @@ - If you have this, you win! properties: [known, portable] solution: |- run "data/scenarios/Tutorials/crash-solution.sw"+ run "scenarios/Tutorials/crash-solution.sw" robots: - name: base dir: [0,1]@@ -66,7 +66,7 @@ invisible: true system: true program: |- run "data/scenarios/Tutorials/crash-secret.sw"+ run "scenarios/Tutorials/crash-secret.sw" known: [water, tree, mountain] world: default: [blank]
data/scenarios/Tutorials/farming.yaml view
@@ -48,8 +48,8 @@ condition: | try {as base {has "curry"}} {return false} solution: |- run "data/scenarios/Tutorials/farming.sw";- run "data/scenarios/Tutorials/make_curry.sw";+ run "scenarios/Tutorials/farming.sw";+ run "scenarios/Tutorials/make_curry.sw"; robots: - name: base display:
data/scenarios/Tutorials/move.yaml view
@@ -213,17 +213,17 @@ system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 2P horizontal wall system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 3P horizontal wall system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" ################# ## VERTICAL ## #################@@ -231,17 +231,17 @@ system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 2P vertical wall system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 3P vertical wall system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" ################# ## CORNERS ## #################@@ -259,17 +259,17 @@ system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 2P lower left corner system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 3P lower left corner system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" ######### ## B ## #########@@ -277,17 +277,17 @@ system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 2P lower right corner system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 3P lower right corner system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" ######### ## C ## #########@@ -295,17 +295,17 @@ system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 2P upper right corner system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 3P upper right corner system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" ######### ## D ## #########@@ -313,17 +313,17 @@ system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 2P upper left corner system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 3P upper left corner system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" ################# ## SEPARATORS ## #################@@ -332,34 +332,34 @@ system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 1S up and horizontal wall system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" # 2 - name: 2S left and vertical wall system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 2S up and horizontal wall system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" # 3 - name: 3S left and vertical wall system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 3S down and horizontal wall system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" ################# ## GATES ## #################@@ -376,12 +376,12 @@ system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 3G system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" ################# ## GARDENERS ## #################@@ -389,17 +389,17 @@ system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 2P flower system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" - name: 3P flower system: true display: invisible: true- program: run "data/scenarios/Tutorials/move_system.sw"+ program: run "scenarios/Tutorials/move_system.sw" entities: - name: Win display:
src/Swarm/Game/Step.hs view
@@ -40,7 +40,7 @@ import Data.List.NonEmpty (NonEmpty ((:|))) import Data.List.NonEmpty qualified as NE import Data.Map qualified as M-import Data.Maybe (fromMaybe, isNothing, listToMaybe)+import Data.Maybe (catMaybes, fromMaybe, isNothing, listToMaybe) import Data.Sequence qualified as Seq import Data.Set (Set) import Data.Set qualified as S@@ -1418,7 +1418,10 @@ -- "./path/to/file.sw" and "./path/to/file" Run -> case vs of [VText fileName] -> do- mf <- sendIO $ mapM readFileMay [into fileName, into $ fileName <> ".sw"]+ let filePath = into @String fileName+ sData <- sendIO $ getDataFileNameSafe filePath+ sDataSW <- sendIO $ getDataFileNameSafe (filePath <> ".sw")+ mf <- sendIO $ mapM readFileMay $ [filePath, filePath <> ".sw"] <> catMaybes [sData, sDataSW] f <- msum mf `isJustOrFail` ["File not found:", fileName]
src/Swarm/Version.hs view
@@ -181,7 +181,7 @@ getNewerReleaseVersion = case gitInfo of -- when using cabal install, the git info is unavailable, which is of no interest to players- Left _e -> upstreamReleaseVersion+ Left _e -> (>>= getUpVer) <$> upstreamReleaseVersion Right gi -> if giBranch gi /= "main" then return . Left . OnDevelopmentBranch $ giBranch gi
swarm.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: swarm-version: 0.1.0.0+version: 0.1.0.1 synopsis: 2D resource gathering game with programmable robots description: Swarm is a 2D programming and resource gathering