Skip to content

Commit

Permalink
Add a space between suit and rank
Browse files Browse the repository at this point in the history
  • Loading branch information
aciidgh committed May 4, 2018
1 parent a0d48d4 commit e94642c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Sources/PlayingCard/PlayingCard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ extension PlayingCard: Comparable {

extension PlayingCard : CustomStringConvertible {
public var description: String {
return "\(suit)\(rank)"
return "\(suit) \(rank)"
}
}
6 changes: 3 additions & 3 deletions Tests/PlayingCardTests/CardTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class CardTests: XCTestCase {
let card2 = PlayingCard(rank: .two, suit: .hearts)
let card3 = PlayingCard(rank: .queen, suit: .diamonds)

XCTAssertEqual(String(describing: card1), "︎J")
XCTAssertEqual(String(describing: card2), "♡2")
XCTAssertEqual(String(describing: card3), "♢Q")
XCTAssertEqual(String(describing: card1), "︎ J")
XCTAssertEqual(String(describing: card2), " 2")
XCTAssertEqual(String(describing: card3), " Q")
}

static var allTests = [
Expand Down

0 comments on commit e94642c

Please sign in to comment.