Skip to content

Instantly share code, notes, and snippets.

@bmalbuck
bmalbuck / MineSweeperDataModel.swift
Last active January 3, 2019 17:50
A simple backing data model for the classic Windows Minesweeper
/******************************************************************************************
** A simple backing data model for the classic Windows Minesweeper
**
** Assumptions: Grid is a square. This can be easily modified for non-square rectangles.
**
*******************************************************************************************/
import Foundation
typealias GridNumericType = UInt8 // Change ex. UInt32 for larger grids
typealias GameGridCoordinate = (row: GridNumericType, col: GridNumericType)

Keybase proof

I hereby claim:

  • I am bmalbuck on github.
  • I am bbuck (https://keybase.io/bbuck) on keybase.
  • I have a public key whose fingerprint is 573D 6950 990C AAFE 1C86 78F5 DB5F 713E 2E1A A0F8

To claim this, I am signing this object:

@bmalbuck
bmalbuck / gist:f0ec2f891233d48e332a
Created January 14, 2015 01:20
Swift array of dictionaries
import UIKit
/*
declare arrayOfDict with full type declaration else
bad things happen :/
ex:
do this
var arrayOfDict:Array<Dictionary <String, Any>> = ...