summaryrefslogtreecommitdiff
path: root/src/components/map/groups/WallGroup.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-08-31 17:59:51 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:05:50 +0200
commit3f736cd3db63f106eac02f220477b4a0f3b0eceb (patch)
tree80afa73f8c4d281b2fccba8ad2baa7c10f7e7e84 /src/components/map/groups/WallGroup.js
parentb17f1d8cb4815f57a4b7043cc91b867ec3cbc867 (diff)
Implement room creation
Diffstat (limited to 'src/components/map/groups/WallGroup.js')
-rw-r--r--src/components/map/groups/WallGroup.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/components/map/groups/WallGroup.js b/src/components/map/groups/WallGroup.js
new file mode 100644
index 00000000..f21d91a5
--- /dev/null
+++ b/src/components/map/groups/WallGroup.js
@@ -0,0 +1,22 @@
+import PropTypes from "prop-types";
+import React from "react";
+import {Group} from "react-konva";
+import Shapes from "../../../shapes/index";
+import {deriveWallLocations} from "../../../util/tile-calculations";
+import WallSegment from "../elements/WallSegment";
+
+const WallGroup = ({tiles}) => {
+ return (
+ <Group>
+ {deriveWallLocations(tiles).map((wallSegment, index) => (
+ <WallSegment key={index} wallSegment={wallSegment}/>
+ ))}
+ </Group>
+ );
+};
+
+WallGroup.propTypes = {
+ tiles: PropTypes.arrayOf(Shapes.Tile).isRequired,
+};
+
+export default WallGroup;