Skip to content

Commit 2af8df1

Browse files
committed
All works but need normal animation
1 parent 4b520d6 commit 2af8df1

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

SnakeGame.xcodeproj/project.pbxproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
TargetAttributes = {
117117
A0997FCE1D3CDB5D00AB2AC4 = {
118118
CreatedOnToolsVersion = 7.3.1;
119+
DevelopmentTeam = 276KGYSJ92;
119120
};
120121
};
121122
};
@@ -273,21 +274,27 @@
273274
isa = XCBuildConfiguration;
274275
buildSettings = {
275276
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
277+
CODE_SIGN_IDENTITY = "iPhone Developer";
278+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
276279
INFOPLIST_FILE = SnakeGame/Info.plist;
277280
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
278281
PRODUCT_BUNDLE_IDENTIFIER = ru.geekbrains.SnakeGame;
279282
PRODUCT_NAME = "$(TARGET_NAME)";
283+
PROVISIONING_PROFILE = "";
280284
};
281285
name = Debug;
282286
};
283287
A0997FE31D3CDB5D00AB2AC4 /* Release */ = {
284288
isa = XCBuildConfiguration;
285289
buildSettings = {
286290
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
291+
CODE_SIGN_IDENTITY = "iPhone Developer";
292+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
287293
INFOPLIST_FILE = SnakeGame/Info.plist;
288294
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
289295
PRODUCT_BUNDLE_IDENTIFIER = ru.geekbrains.SnakeGame;
290296
PRODUCT_NAME = "$(TARGET_NAME)";
297+
PROVISIONING_PROFILE = "";
291298
};
292299
name = Release;
293300
};

SnakeGame/GameFieldView.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ class SegmentView: UIView {
6262
var segment: GameSegment!{
6363
didSet{
6464
frame = segment.rect
65+
66+
// UIView.animateWithDuration(0.10, animations: {
67+
// self.frame = self.segment.rect
68+
// })
69+
6570
setNeedsDisplay()
6671
}
6772
}
@@ -84,9 +89,8 @@ class SegmentView: UIView {
8489
switch segment.type {
8590
case .Head, .Tail, .Middle, .Food:
8691
return UIBezierPath(ovalInRect: CGRect(x: 0, y: 0, width: bounds.width, height: bounds.height))
87-
default:
92+
case .Border:
8893
let fillRect = CGRect(x: 1, y: 1, width: bounds.width-2, height: bounds.width - 2)
89-
9094
return UIBezierPath(roundedRect: fillRect, cornerRadius: bounds.width/5)
9195
}
9296
}

SnakeGame/GameModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import UIKit
1010

11-
let side: CGFloat = UIScreen.mainScreen().bounds.width / 25
11+
let side: CGFloat = UIScreen.mainScreen().bounds.width / 20
1212

1313
protocol BrainDelegate {
1414
func snakeIsDeadWithScore(value: Int)

0 commit comments

Comments
 (0)