var sailingadventure = new adventure(); sailingadventure.prepare("pre-founding", "updates"); for(int day = 1; day <= sailingadventure.duration; day++) { if(!sailingadventure.followcurrents) { sailingadventure.adjustcourse("do not follow"); } if(sailingadventure.isstealthyday(day)) { console.writeline("enjoy the stealthy beauty of the sea, start over each morning with the thrill of unseen horizons."); } else { sailingadventure.updatelog("enjoy today's sailing, remember to be stealthy!"); } }