public class TravelingSalesmanTheme extends WeightedTheme<TravelingSalesmanInstance>
MY_COLOR, WEIGHTED_HEIGHT, WEIGHTED_THEME, WEIGHTED_WIDTH
Constructor and Description |
---|
TravelingSalesmanTheme() |
Modifier and Type | Method and Description |
---|---|
void |
drawVertex(java.awt.Graphics2D g,
TravelingSalesmanInstance game,
Vertex v)
Dictates how a vertex should be drawn.
|
java.awt.Color |
getEdgeColor(TravelingSalesmanInstance game,
Vertex a,
Vertex b)
Defines the color used for drawing edges.
|
drawAnimation, drawVertex, getAnimationStage, getBoundingHeight, getBoundingWidth, getDrawingHeight, getDrawingWidth, getNumberAnimatingFrames, getThemeName, getVertexCenter, setupMoveAnimation
draw, drawBWVertex, drawNormalVertex, drawSelectedVertex, drawTargetVertex, getAnimationFrame, getBrightnessFactor, getTheme, getVerticesSortedByY, isAnimatingConfig, isBlinkEdges, isDrawCurvyEdges, setAnimatingConfig, setAnimationFrame, setBlinkEdges, setDrawCurvyEdges, tick, tickIt
public java.awt.Color getEdgeColor(TravelingSalesmanInstance game, Vertex a, Vertex b)
NewTheme
getEdgeColor
in class WeightedTheme<TravelingSalesmanInstance>
game
- The PuzzleInstance subclass containing game dataa
- The first vertex connected by an edgeb
- The second vertex connected by this edgepublic void drawVertex(java.awt.Graphics2D g, TravelingSalesmanInstance game, Vertex v)
NewTheme
drawVertex
in class NewTheme<TravelingSalesmanInstance>
g
- The graphics object to draw ongame
- The PuzzleInstance subclass containing game datav
- The vertex to be drawn