//
//  A T2 test game: 
//			a lhs banner that changes width: 
//				previous (i.e. to contents), previous, 25%, previous, 35%, previous, ...
//

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

startroom: room
   sdesc = "XTads T2 banner test"
   ldesc = "Should show a banner that changes width: previous (i.e. to contents), previous, 25%, previous, 35%, previous, ..."
   turnCount = 0
   widths = ['previous', 'previous', '25%', 'previous', '35%', 'previous']
	statusLine =
		{
		local width;
		local cycleCount;
		
		turnCount += 1;
		cycleCount := ((turnCount - 1) % length(widths)) + 1;
		width := widths[cycleCount];
		
		"<banner id=custStatusLine align=left width=<<width>> border>
			banner text <<turnCount>>, width=<<width>>
		</banner>";
		}
;

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