Latest 1.1.0
License MIT
Platforms ios 10.0


BoardGameManager is a Cocoapod that helps with score calculation, transformation and traversal in board games on iOS. It gives the direction and angles between nodes in trails on the board which can be used for score calculation (Weirder the angle, higher the score). It has spiral traversal and various flipping and rotational transformations.


  • Swift 4.2
  • iOS 10 and above


BoardGameManager is available on CocoaPods.

Add this line to your Podfile.

pod 'BoardGameManager'

Run pod install.


Create a board

let board = BoardManager.shared.getBoard(width: 3, height: 3, rule: BoardTraversingRule.orthogonalOnly)

List of methods in Board

  • getAngle (first: (x: Int, y: Int), second: (x: Int, y: Int), third: (x: Int, y: Int)) -> Angle?

  • getDirection (first: (x: Int, y: Int), second: (x: Int, y: Int)) -> Direction?

  • transform(transformation : Transformation) -> [[(x: Int, y: Int)]]

  • areNeighbours (first : (a: Int, b: Int), second : (a: Int, b: Int)) -> Bool?

  • getSpiralTraversalPath () -> [(x: Int, y: Int)]

  • createAndSetRandomStringUsingLetterFrequency () -> String

  • createAndSetRandomString (from set: [Character]) -> String

  • getIndices (from position : Int) -> (a: Int, b: Int)?

  • getPosition (from indices: (a: Int, b: Int)) -> Int?

  • isValidIndex (_ indices : (Int, Int)...) -> Bool


This project is licensed under the MIT License – see the LICENSE file for details

Latest podspec

    "name": "BoardGameManager",
    "version": "1.1.0",
    "summary": "Helps with traversing, transformation and score calculation in board games",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Prasad Shinde": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.1.0"
    "platforms": {
        "ios": "10.0"
    "source_files": "BoardGameManager/*.swift",
    "swift_version": "4.2"

Pin It on Pinterest

Share This