54eaddb27d
stuff into Narya. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2876 542714f4-19e9-0310-aa3c-eee0fc999fb1
44 lines
944 B
Java
44 lines
944 B
Java
//
|
|
// $Id: SegmentInfo.java,v 1.1 2003/11/26 01:42:34 mdb Exp $
|
|
|
|
package com.threerings.puzzle.drop.data;
|
|
|
|
import com.samskivert.util.StringUtil;
|
|
|
|
import com.threerings.util.DirectionCodes;
|
|
|
|
/**
|
|
* Describes a segment of pieces in a {@link DropBoard}.
|
|
*/
|
|
public class SegmentInfo
|
|
{
|
|
/** The segment's direction; one of {@link DirectionCodes#HORIZONTAL}
|
|
* or {@link DirectionCodes#VERTICAL}. */
|
|
public int dir;
|
|
|
|
/** The segment's lower-left board coordinates. */
|
|
public int x, y;
|
|
|
|
/** The segment's length in pieces. */
|
|
public int len;
|
|
|
|
/**
|
|
* Constructs a segment info object.
|
|
*/
|
|
public SegmentInfo (int dir, int x, int y, int len)
|
|
{
|
|
this.dir = dir;
|
|
this.x = x;
|
|
this.y = y;
|
|
this.len = len;
|
|
}
|
|
|
|
/**
|
|
* Returns a string representation of this instance.
|
|
*/
|
|
public String toString ()
|
|
{
|
|
return StringUtil.fieldsToString(this);
|
|
}
|
|
}
|