File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ ![ DominoKit] ( https://raw.githubusercontent.com/jarrodparkes/DominoKit/assets/domino-kit.png " Domino Kit ")
2
+
3
+ <img src =" https://img.shields.io/badge/os-mac | linux-blue.svg?style=flat " alt =" Mac and Linux " />
4
+ <a href =" https://raw.githubusercontent.com/jarrodparkes/DominoKit/master/LICENSE " ><img src =" http://img.shields.io/badge/license-MIT-blue.svg?style=flat " alt =" License: MIT " /></a >
5
+ <a href =" https://developer.apple.com/swift " ><img src =" https://img.shields.io/badge/swift3-compatible-orange.svg?style=flat " alt =" Swift 3 Compatible " /></a >
6
+
7
+ ## Summary
8
+
9
+ DominoKit is a Swift library for creating applications with dominoes.
10
+
11
+ ## Installation
12
+
13
+ Using the Swift Package Manager, ensure the DominoKit is included in the dependencies section of ` Package.swift ` :
14
+
15
+ ``` swift
16
+ let package = Package (
17
+ name : " MyProject" ,
18
+ dependencies : [
19
+ .Package (url : " https://github.com/jarrodparkes/DominoKit.git" , majorVersion : 1 ),
20
+ ...
21
+ ]
22
+ ...
23
+ )
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ ``` swift
29
+ import DominoKit
30
+
31
+ let sixEight = Domino (suitOne : .six , suitTwo : .eight )
32
+ print (sixEight) // "[06|08]"
33
+ print (sixEight.suitOne ) // "06"
34
+ print (sixEight.suitTwo ) // "08"
35
+ print (sixEight.isDouble ) // false
36
+ print (sixEight.isSingle ) // true
37
+ print (sixEight.rank ) // 14
38
+
39
+ let doubleSix = Domino (doubleSuit : .six )
40
+ print (sixEight.hasMatchingSuit (withDomino : doubleSix)) // true
41
+ ```
You can’t perform that action at this time.
0 commit comments