//
//  A T2 test game: 
//

#include <adv.t>
#include <std.t>

startroom: room
   sdesc = "XTads T2 banner test"
   ldesc = "Should show a lhs banner that changes width: unspecified, previous, previous, ..."
   turnCount = 0
   widths = [nil, 'previous', 'previous']
   //contentList = ['one', 'twoo twoo', 'threee three three', 'fourrrrrr fourrrr']
   contentList = ['unspecd', 'preeevious', 'preeeeevious', 'unspecddddddddddd', 'previous', 'preeeeevious']
	statusLine =
		{
		local cycleCount;
		local cycleCount2;
		local width;
		local widthAttr;
		
		turnCount += 1;
		cycleCount := ((turnCount - 1) % length(widths)) + 1;
		cycleCount2 := ((turnCount - 1) % length(contentList)) + 1;
		width := widths[cycleCount];
		if (width = nil) {
			widthAttr := '';
		} else {
			widthAttr := ('width=' + width);
		}
		
		"<banner id=custStatusLine align=left <<widthAttr>> border>
			<<contentList[cycleCount2]>>
		</banner>";
		}
;

replace commonInit: function
{
    // turn on html mode
    "\H+";
}
