Class MimicWFC

java.lang.Object
squidpony.squidgrid.MimicWFC

public class MimicWFC
extends Object
A port of WaveFunctionCollapse by ExUtumno/mxgmn; takes a single sample of a grid to imitate and produces one or more grids of requested sizes that have a similar layout of cells to the sample. Samples are given as int[][] where an int is usually an index into an array, list, Arrangement, or some similar indexed collection of items (such as char values or colors) that would be used instead of an int directly. The original WaveFunctionCollapse code, here, used colors in bitmap images, but this uses 2D int arrays that can stand as substitutes for colors or chars.
Created by Tommy Ettinger on 3/28/2018. Port of https://github.com/mxgmn/WaveFunctionCollapse
  • Field Summary

    Fields 
    Modifier and Type Field Description
    IRNG random  
  • Constructor Summary

    Constructors 
    Constructor Description
    MimicWFC​(int[][] itemGrid, int order, int width, int height, boolean periodicInput, boolean periodicOutput, int symmetry, int ground)  
  • Method Summary

    Modifier and Type Method Description
    int[][] result()  
    boolean run​(long seed, int limit)  
    boolean run​(IRNG rng, int limit)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • MimicWFC

      public MimicWFC​(int[][] itemGrid, int order, int width, int height, boolean periodicInput, boolean periodicOutput, int symmetry, int ground)
  • Method Details