Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.05 KB

README.md

File metadata and controls

33 lines (21 loc) · 1.05 KB

Wang

Generate random (or pseudo-random) Wang tile arrays in Swift

Usage

Generate a matching random Wang tile array with given width and height using the specified collection:

import Wang

let wang = Wang(width: 18, height: 12, collection: .corner)
let result = wang.generate() // [Wang.Tile]
        

Generate a matching pseudo-random Wang tile array with given width and height using the specified collection:

import Wang

let wang = Wang(width: 18, height: 12, collection: .blob)
let result = wang.generate(seed: 42) // [Wang.Tile]
        

References