com.planet_ink.coffee_mud.Libraries.layouts
Class AbstractLayout

java.lang.Object
  extended by com.planet_ink.coffee_mud.Libraries.layouts.AbstractLayout
All Implemented Interfaces:
AreaGenerationLibrary.LayoutManager
Direct Known Subclasses:
BoxCityLayout, CrossLayout, GridCityLayout, MazeLayout, TreeLayout

public abstract class AbstractLayout
extends java.lang.Object
implements AreaGenerationLibrary.LayoutManager

Abstract area layout pattern node tags: nodetype: surround, leaf, offleaf, street, square, interior nodeexits: n,s,e,w, n,s, e,w, n,e,w, etc nodeflags: corner, gate, intersection, tee NODEGATEEXIT: (for gate, offleaf, square): n s e w etc noderun: (for surround, street): n,s e,w


Constructor Summary
AbstractLayout()
           
 
Method Summary
 int diff(int width, int height, int num)
           
abstract  java.util.Vector<AreaGenerationLibrary.LayoutNode> generate(int num, int dir)
           
static int getDirection(AreaGenerationLibrary.LayoutNode from, AreaGenerationLibrary.LayoutNode to)
           
static AreaGenerationLibrary.LayoutRuns getRunDirection(int dirCode)
           
abstract  java.lang.String name()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLayout

public AbstractLayout()
Method Detail

diff

public int diff(int width,
                int height,
                int num)

name

public abstract java.lang.String name()
Specified by:
name in interface AreaGenerationLibrary.LayoutManager

generate

public abstract java.util.Vector<AreaGenerationLibrary.LayoutNode> generate(int num,
                                                                            int dir)
Specified by:
generate in interface AreaGenerationLibrary.LayoutManager

getDirection

public static int getDirection(AreaGenerationLibrary.LayoutNode from,
                               AreaGenerationLibrary.LayoutNode to)

getRunDirection

public static AreaGenerationLibrary.LayoutRuns getRunDirection(int dirCode)