Skip to content

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

License

Notifications You must be signed in to change notification settings

infinitetoken/Wang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages