Skip to content

Commit

Permalink
Merge branch 'release/1.2.22'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bam4d committed Dec 12, 2021
2 parents 7d21069 + 7a52702 commit 6f4e30b
Show file tree
Hide file tree
Showing 14 changed files with 1,101 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. mac/linux/windows]
- Version [e.g. 1.2.21]
- Version [e.g. 1.2.22]

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10.0)
project(Griddly VERSION 1.2.21)
project(Griddly VERSION 1.2.22)

set(BINARY ${CMAKE_PROJECT_NAME})

Expand Down
2 changes: 1 addition & 1 deletion bindings/python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace griddly {

PYBIND11_MODULE(python_griddly, m) {
m.doc() = "Griddly python bindings";
m.attr("version") = "1.2.21";
m.attr("version") = "1.2.22";

#ifndef NDEBUG
spdlog::set_level(spdlog::level::debug);
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Chris Bamford'

# The full version, including alpha/beta/rc tags
release = '1.2.21'
release = '1.2.22'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def griddly_package_data(config='Debug'):

setup(
name='griddly',
version="1.2.21",
version="1.2.22",
author_email="[email protected]",
description="Griddly Python Libraries",
long_description=long_description,
Expand Down
15 changes: 15 additions & 0 deletions python/tests/example_mechanics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Mechanics Integration Tests

The mechanics integration tests here make sure that future updates do not break simple important mechanics.
These tests also make sure that the examples in the python project are working.

These tests do:
* Provide a list of environments with specific mechanics
* These specific mechanics are important to keep working in future updates
* Prove that the specific mechanics are not broken.
* Check that state information is as-expected during state transitions

These tests do not:
* Check rendering of environments


169 changes: 169 additions & 0 deletions python/tests/example_mechanics/project_lines/project_lines.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
Version: "0.1"
Environment:
Name: Bombs
Description: |
This environment tests
* Objects can be spawn underneath the agent
* Objects can spawn other object repeatedly in directions in single time-steps
* Objects can be removed with delayed actions
* Custom Action Ids with custom VectorToDests can be used to propagate further actions on spawns
Player:
AvatarObject: bomber # The player can only control a single avatar in the game
Levels:
- |
w w w w w w w w w w w w w
w . . . . . . . . . . . w
w . . . . . . . . . . . w
w . . . . . . . . . . . w
w . . . . . . . . . . . w
w . . . . B . . . . . . w
w . . . . . . . . . . . w
w . . . . . . . . . . . w
w . . . . . . . . . . . w
w w w w w w w w w w w w w
Actions:

# Define the move action
- Name: move
Behaviours:

# Avatar and boxes can move into empty space
- Src:
Object: bomber
Commands:
- mov: _dest
Dst:
Object: _empty

- Name: plant_bomb
InputMapping:
Inputs:
1:
VectorToDest: [ 0, 0 ]
Behaviours:
- Src:
Object: bomber
Commands:
- spawn: bomb
Dst:
Object: [ bomb, bomber ]


- Name: explode_bomb
InputMapping:
Inputs:
1:
VectorToDest: [ 0, 0 ]
Internal: true
Behaviours:
- Src:
Object: bomb
Commands:
- remove: true
- exec:
Action: propagate_explosion
ActionId: 1
- exec:
Action: propagate_explosion
ActionId: 2
- exec:
Action: propagate_explosion
ActionId: 3
- exec:
Action: propagate_explosion
ActionId: 4
- exec:
Action: propagate_explosion
ActionId: 5
Dst:
Object: [ bomb, bomber ]



- Name: propagate_explosion
InputMapping:
Inputs:
1:
VectorToDest: [ 0,0 ]
2:
VectorToDest: [ 1,0 ]
3:
VectorToDest: [ 0,1 ]
4:
VectorToDest: [ -1,0 ]
5:
VectorToDest: [ 0,-1 ]
Internal: true
Behaviours:
- Src:
Object: [ bomb, explosion ]
Dst:
Object: _empty
Commands:
- spawn: explosion
- exec:
Action: propagate_explosion

- Name: end_explosion
InputMapping:
Inputs:
1:
VectorToDest: [ 0, 0 ]
Internal: true
Behaviours:
- Src:
Object: explosion
Commands:
- remove: true
Dst:
Object: explosion


Objects:

- Name: bomber
Z: 3
MapCharacter: B
Observers:
Block2D:
- Shape: triangle
Color: [ 0.0, 1.0, 0.0 ]
Scale: 0.8

- Name: wall
Z: 1
MapCharacter: w
Observers:
Block2D:
- Shape: square
Color: [ 0.5, 0.5, 0.5 ]
Scale: 0.9

- Name: bomb
Z: 2
InitialActions:
- Action: explode_bomb
Delay: 3
ActionId: 1
MapCharacter: x
Observers:
Block2D:
- Shape: triangle
Color: [ 0.9, 0.1, 0.1 ]
Scale: 0.5

- Name: explosion
Z: 1
InitialActions:
- Action: end_explosion
Delay: 2
ActionId: 1

- Action: propagate_explosion
MapCharacter: x
Observers:
Block2D:
- Shape: triangle
Color: [ 0.9, 0.9, 0.1 ]
Scale: 0.9
Loading

0 comments on commit 6f4e30b

Please sign in to comment.