From 5eb9daa02ba9cd8be430e5152003188dff29201d Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Sat, 2 May 2020 18:06:18 +0200 Subject: [PATCH 1/2] Create files for Map model --- GoldWars/GoldWars.xcodeproj/project.pbxproj | 8 ++++++++ GoldWars/GoldWars/MapProtocoll.swift | 15 +++++++++++++++ .../GoldWars/TwoPlayerDefaultTestMap.swift | 19 +++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 GoldWars/GoldWars/MapProtocoll.swift create mode 100644 GoldWars/GoldWars/TwoPlayerDefaultTestMap.swift diff --git a/GoldWars/GoldWars.xcodeproj/project.pbxproj b/GoldWars/GoldWars.xcodeproj/project.pbxproj index 0d62603..445df4a 100644 --- a/GoldWars/GoldWars.xcodeproj/project.pbxproj +++ b/GoldWars/GoldWars.xcodeproj/project.pbxproj @@ -35,6 +35,8 @@ 9EA3ABEF245C834B006BC61D /* ModalContentComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EA3ABEE245C834B006BC61D /* ModalContentComponent.swift */; }; 9EC86B9F245C88A300796EF3 /* Modal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EC86B9E245C88A300796EF3 /* Modal.swift */; }; 9EC86BA6245C8AD000796EF3 /* ModalType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EC86BA5245C8AD000796EF3 /* ModalType.swift */; }; + AB1D759C245DD18100671525 /* MapProtocoll.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB1D759A245DD18100671525 /* MapProtocoll.swift */; }; + AB1D759D245DD18100671525 /* TwoPlayerDefaultTestMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB1D759B245DD18100671525 /* TwoPlayerDefaultTestMap.swift */; }; ABA03DA0244BD54F00A66916 /* Base.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABA03D9F244BD54F00A66916 /* Base.swift */; }; /* End PBXBuildFile section */ @@ -91,6 +93,8 @@ 9EC86B9E245C88A300796EF3 /* Modal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Modal.swift; sourceTree = ""; }; 9EC86BA5245C8AD000796EF3 /* ModalType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalType.swift; sourceTree = ""; }; 9ECD3699245C91F7008DEEBD /* GoldWars.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = GoldWars.entitlements; sourceTree = ""; }; + AB1D759A245DD18100671525 /* MapProtocoll.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MapProtocoll.swift; sourceTree = ""; }; + AB1D759B245DD18100671525 /* TwoPlayerDefaultTestMap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TwoPlayerDefaultTestMap.swift; sourceTree = ""; }; ABA03D9F244BD54F00A66916 /* Base.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Base.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -144,6 +148,8 @@ 110360D1244B101A008610AF /* GoldWars */ = { isa = PBXGroup; children = ( + AB1D759A245DD18100671525 /* MapProtocoll.swift */, + AB1D759B245DD18100671525 /* TwoPlayerDefaultTestMap.swift */, 9ECD3699245C91F7008DEEBD /* GoldWars.entitlements */, 9E11FF74245CD79100EED3BE /* Partikels */, 116060F5245C5709004E5A36 /* Entities */, @@ -399,6 +405,8 @@ 9EA3ABE9245C6DAA006BC61D /* DefaultBaseComponent.swift in Sources */, 9EA3ABED245C8143006BC61D /* ModalBackgroundComponent.swift in Sources */, 3EBD242C245D8044003CECE7 /* GameCenterHelper.swift in Sources */, + AB1D759C245DD18100671525 /* MapProtocoll.swift in Sources */, + AB1D759D245DD18100671525 /* TwoPlayerDefaultTestMap.swift in Sources */, ABA03DA0244BD54F00A66916 /* Base.swift in Sources */, 110360DB244B101A008610AF /* GameViewController.swift in Sources */, 110360D3244B101A008610AF /* AppDelegate.swift in Sources */, diff --git a/GoldWars/GoldWars/MapProtocoll.swift b/GoldWars/GoldWars/MapProtocoll.swift new file mode 100644 index 0000000..5d3412a --- /dev/null +++ b/GoldWars/GoldWars/MapProtocoll.swift @@ -0,0 +1,15 @@ +// +// MapProtocoll.swift +// GoldWars +// +// Created by Marcel Schwarz on 02.05.20. +// Copyright © 2020 SP2. All rights reserved. +// + +import Foundation + +protocol MapProtocoll { + + func adjacent(base: Base) -> Array + +} diff --git a/GoldWars/GoldWars/TwoPlayerDefaultTestMap.swift b/GoldWars/GoldWars/TwoPlayerDefaultTestMap.swift new file mode 100644 index 0000000..ab9387b --- /dev/null +++ b/GoldWars/GoldWars/TwoPlayerDefaultTestMap.swift @@ -0,0 +1,19 @@ +// +// DefaultTestMap.swift +// GoldWars +// +// Created by Marcel Schwarz on 02.05.20. +// Copyright © 2020 SP2. All rights reserved. +// + +import Foundation + +class TwoPlayerDefaultTestMap: MapProtocoll { + + + func adjacent(base: Base) -> Array { + return Array() + } + + +} From 4c37ac690cc1321dc7984f426ebcb34e1fd14e7c Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Sat, 2 May 2020 18:11:01 +0200 Subject: [PATCH 2/2] Move files to correct directory --- GoldWars/GoldWars.xcodeproj/project.pbxproj | 12 ++++++++++-- GoldWars/GoldWars/{ => Map}/MapProtocoll.swift | 0 .../GoldWars/{ => Map}/TwoPlayerDefaultTestMap.swift | 0 3 files changed, 10 insertions(+), 2 deletions(-) rename GoldWars/GoldWars/{ => Map}/MapProtocoll.swift (100%) rename GoldWars/GoldWars/{ => Map}/TwoPlayerDefaultTestMap.swift (100%) diff --git a/GoldWars/GoldWars.xcodeproj/project.pbxproj b/GoldWars/GoldWars.xcodeproj/project.pbxproj index 445df4a..37f6e37 100644 --- a/GoldWars/GoldWars.xcodeproj/project.pbxproj +++ b/GoldWars/GoldWars.xcodeproj/project.pbxproj @@ -148,11 +148,10 @@ 110360D1244B101A008610AF /* GoldWars */ = { isa = PBXGroup; children = ( - AB1D759A245DD18100671525 /* MapProtocoll.swift */, - AB1D759B245DD18100671525 /* TwoPlayerDefaultTestMap.swift */, 9ECD3699245C91F7008DEEBD /* GoldWars.entitlements */, 9E11FF74245CD79100EED3BE /* Partikels */, 116060F5245C5709004E5A36 /* Entities */, + AB1D759E245DD2EA00671525 /* Map */, 116060F4245C56EA004E5A36 /* Components */, 9EC86BA2245C89B200796EF3 /* Enums */, 9EC86BA4245C8A1E00796EF3 /* Scenes */, @@ -256,6 +255,15 @@ path = Scenes; sourceTree = ""; }; + AB1D759E245DD2EA00671525 /* Map */ = { + isa = PBXGroup; + children = ( + AB1D759A245DD18100671525 /* MapProtocoll.swift */, + AB1D759B245DD18100671525 /* TwoPlayerDefaultTestMap.swift */, + ); + path = Map; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ diff --git a/GoldWars/GoldWars/MapProtocoll.swift b/GoldWars/GoldWars/Map/MapProtocoll.swift similarity index 100% rename from GoldWars/GoldWars/MapProtocoll.swift rename to GoldWars/GoldWars/Map/MapProtocoll.swift diff --git a/GoldWars/GoldWars/TwoPlayerDefaultTestMap.swift b/GoldWars/GoldWars/Map/TwoPlayerDefaultTestMap.swift similarity index 100% rename from GoldWars/GoldWars/TwoPlayerDefaultTestMap.swift rename to GoldWars/GoldWars/Map/TwoPlayerDefaultTestMap.swift