us.asciiroth.client.core
Class Symbol

java.lang.Object
  extended by us.asciiroth.client.core.Symbol

public class Symbol
extends java.lang.Object

An immutable, visual representation of a piece in the game. Game boards are marked as either outside or not (underground), which indicates that the board is either lit by sunlight (and thus more naturally colored), or not. In the latter case, the color scheme is the same kind of inverse white-on-black colors you see in a terminal and that is the stuff of roguelike games.

Symbols are layered, currently with terrain on the bottom, followed by items, then effects, and then the agent if present. The highest entity, color or background color is merged into the final symbol displayed for a given cell.


Constructor Summary
Symbol(java.lang.String entity, Color color)
          Constructor.
Symbol(java.lang.String entity, Color color, Color background)
          Constructor.
Symbol(java.lang.String entity, Color fg, Color bg, Color ofg, Color obg)
          Constructor.
Symbol(java.lang.String entity, java.lang.String advanced, Color color)
          Constructor.
Symbol(java.lang.String entity, java.lang.String advanced, Color color, Color background)
          Constructor.
Symbol(java.lang.String entity, java.lang.String advanced, Color fg, Color bg, Color ofg, Color obg)
          Constructor.
 
Method Summary
 java.lang.String getAdjustedEntity()
           
 java.lang.String getAdvanced()
           
 Color getBackground(boolean outside)
           
 Color getColor(boolean outside)
           
 java.lang.String getEntity()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Symbol

public Symbol(java.lang.String entity,
              Color color)
Constructor.

Parameters:
entity -
color -

Symbol

public Symbol(java.lang.String entity,
              Color color,
              Color background)
Constructor.

Parameters:
entity -
color -
background -

Symbol

public Symbol(java.lang.String entity,
              Color fg,
              Color bg,
              Color ofg,
              Color obg)
Constructor.

Parameters:
entity -
fg -
bg -
ofg -
obg -

Symbol

public Symbol(java.lang.String entity,
              java.lang.String advanced,
              Color color)
Constructor.

Parameters:
entity -
advanced -
color -

Symbol

public Symbol(java.lang.String entity,
              java.lang.String advanced,
              Color color,
              Color background)
Constructor.

Parameters:
entity -
color -
background -

Symbol

public Symbol(java.lang.String entity,
              java.lang.String advanced,
              Color fg,
              Color bg,
              Color ofg,
              Color obg)
Constructor.

Parameters:
entity -
advanced -
fg -
bg -
ofg -
obg -
Method Detail

getAdjustedEntity

public java.lang.String getAdjustedEntity()

getAdvanced

public java.lang.String getAdvanced()

getBackground

public Color getBackground(boolean outside)

getColor

public Color getColor(boolean outside)

getEntity

public java.lang.String getEntity()

0.7

© 2009 Alx Dark