Create attractive VASL scenarios, with loads of useful information embedded to assist with game play.
https://vasl-templates.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.0 KiB
37 lines
1.0 KiB
package vassal_shim.lfa ;
|
|
|
|
import org.w3c.dom.Document ;
|
|
import org.w3c.dom.Element ;
|
|
|
|
// --------------------------------------------------------------------
|
|
|
|
public class TurnTrackEvent implements Event
|
|
{
|
|
String playerSide ;
|
|
String turnNo ;
|
|
String phaseName ;
|
|
|
|
public TurnTrackEvent( String playerSide, String turnNo, String phaseName )
|
|
{
|
|
// initialize the TurnTrackEvent
|
|
this.playerSide = playerSide ;
|
|
this.turnNo = turnNo ;
|
|
this.phaseName = phaseName ;
|
|
}
|
|
|
|
public Element makeXmlElement( Document doc )
|
|
{
|
|
// create an XML element for the TurnTrackEvent
|
|
Element elem = doc.createElement( "turnTrackEvent" ) ;
|
|
elem.setAttribute( "side", playerSide ) ;
|
|
elem.setAttribute( "turnNo", turnNo ) ;
|
|
elem.setAttribute( "phase", phaseName ) ;
|
|
return elem ;
|
|
}
|
|
|
|
public String toString()
|
|
{
|
|
// return the TurnTrackEvent as a string
|
|
return "<TurnTrackEvent:" + playerSide + ":" + turnNo + ":" + phaseName + ">" ;
|
|
}
|
|
}
|
|
|