Skip to content

Commit

Permalink
Fixes for Xcode 8 Beta 4
Browse files Browse the repository at this point in the history
  • Loading branch information
davecom committed Aug 5, 2016
1 parent 290bb3d commit 74ce360
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/Backtrack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public func backtrackingSearch<V, D>(csp: CSP<V, D>, assignment: Dictionary<V, D
if (result != False) return result; */
} else {
if let result = backtrackingSearch(csp: csp, assignment: localAssignment, mrv: mrv, mac3: mac3, lcv: lcv) {
if let result = backtrackingSearch(csp: csp, assignment: localAssignment, mrv: mrv, lcv: lcv, mac3: mac3) {
return result
}
}
Expand Down
Binary file modified SwiftCSP/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion SwiftCSP/SwiftCSP/CircuitBoard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import Cocoa
class CircuitBoard: NSObject { //get hashable for free and dynamic access
var height: Int = 1
var width: Int = 1
var color: NSColor = NSColor.red()
var color: NSColor = NSColor.red
var location: (Int, Int)?

//generate the domain as a list of tuples of bottom left corners
Expand Down
2 changes: 1 addition & 1 deletion SwiftCSP/SwiftCSP/LayoutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class LayoutView: NSView {
bPath.line(to: NSMakePoint(CGFloat(width), CGFloat((height/boxDimension) * i)))
}

NSColor.black().set()
NSColor.black.set()
bPath.stroke()

}
Expand Down
4 changes: 2 additions & 2 deletions SwiftCSP/SwiftCSPTests/SendMoreMoneyTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ final class SendMoreMoneyConstraint: ListConstraint <String, Int> {

// if all variables have been assigned, check if it adds up correctly
if assignment.count == variables.count {
if let s = assignment["S"], e = assignment["E"], n = assignment["N"], d = assignment["D"], m = assignment["M"], o = assignment["O"], r = assignment["R"], y = assignment["Y"] {
if let s = assignment["S"], let e = assignment["E"], let n = assignment["N"], let d = assignment["D"], let m = assignment["M"], let o = assignment["O"], let r = assignment["R"], let y = assignment["Y"] {
let send: Int = s * 1000 + e * 100 + n * 10 + d
let more: Int = m * 1000 + o * 100 + r * 10 + e
let money: Int = m * 10000 + o * 1000 + n * 100 + e * 10 + y
Expand Down Expand Up @@ -92,7 +92,7 @@ class SendMoreMoneyTest: XCTestCase {
if let solution = backtrackingSearch(csp: cs, mrv: true) {
print(solution, terminator: "")

if let s = solution["S"], e = solution["E"], n = solution["N"], d = solution["D"], m = solution["M"], o = solution["O"], r = solution["R"], y = solution["Y"] {
if let s = solution["S"], let e = solution["E"], let n = solution["N"], let d = solution["D"], let m = solution["M"], let o = solution["O"], let r = solution["R"], let y = solution["Y"] {
let send: Int = s * 1000 + e * 100 + n * 10 + d
let more: Int = m * 1000 + o * 100 + r * 10 + e
let money: Int = m * 10000 + o * 1000 + n * 100 + e * 10 + y
Expand Down

0 comments on commit 74ce360

Please sign in to comment.