Skip to content
Snippets Groups Projects
Commit dd81f62a authored by mcmlxxix's avatar mcmlxxix
Browse files

Bubble Boggle ("Big Boggle" clone)

parent 43153fd1
No related branches found
No related tags found
No related merge requests found
                                   W O R D - L I S T                                                                   @00  @01  @02  @03  @04                                                                                                                                                                                    @10  @11  @12  @13  @14                                                                                                       Time Remaining:                                                                                                                          @20  @21  @22  @23  @24                                                                                                                                                                                                                                                @30  @31  @32  @33  @34                                                                                                                                                                                                                               @40  @41  @42  @43  @44 Words  :                                                                Points :         COMMANDS : [? ] Redraw Screen : [E s c a p e ] Quit Game : Type words to be submitted 
\ No newline at end of file
This diff is collapsed.
 BUB B LE   BOG G LE      M a t t J o h n s o n : 2 0 0 9  
                  Player Name            Pts   Avg  Plays  Last On                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         Lobby Menu Commands:    Last Month's Winner:                    Points:                               [    ] Browse Calendar                                                             [P ] Play Game                                                                   [C ] Change Date                                                                 [R ] Refresh Screen                                                              [Q ] Quit Game                                                               
\ No newline at end of file
function Timer(x,y,color)
{
this.x=x?x:1;
this.y=y?y:1;
this.color=color?color:"\1n\1h";
this.columns=17;
this.rows=5;
this.countdown;
this.lastupdate=-1;
this.lastshown=-1;
this.digits=[];
this.Init=function(length)
{
this.LoadDigits();
this.countdown=length;
this.lastupdate=time();
}
this.Redraw=function()
{
this.Update(true);
}
this.Update=function(forced)
{
var current=time();
if(current>this.lastupdate || forced)
{
var mins=parseInt(this.countdown/60);
var secs=this.countdown%60;
if(secs<10) secs= "0" + secs;
if(mins==0 && secs<30) this.color="\1r\1h";
this.lastshown=current;
var t=mins.toString() + ":" + secs.toString();
this.DrawClock(t);
}
}
this.DrawClock=function(time)
{
console.attributes=this.color;
for(i=0;i<5;i++)
{
console.gotoxy(this.x,this.y+i);
for(d=0;d<time.length;d++)
{
var digit=time.charAt(d);
if(digit==":") digit=this.digits["colon"][i] + " ";
else if(digit==" ");
else if(digit==1) digit=" " + this.digits[1][i] + " ";
else digit=this.digits[parseInt(digit)][i] + " ";
console.write(digit);
}
}
console.attributes=ANSI_NORMAL;
}
this.LoadDigits=function()
{
var zero=["\xDC\xDC\xDC","\xDB \xDB","\xDB \xDB","\xDB \xDB","\xDF\xDF\xDF"];
var one=["\xDC","\xDB","\xDB","\xDB","\xDF"];
var two=["\xDC\xDC\xDC"," \xDB","\xDB\xDF\xDF","\xDB ","\xDF\xDF\xDF"];
var three=["\xDC\xDC\xDC"," \xDB","\xDF\xDF\xDB"," \xDB","\xDF\xDF\xDF"];
var four=["\xDC \xDC","\xDB \xDB","\xDF\xDF\xDB"," \xDB"," \xDF"];
var five=["\xDC\xDC\xDC","\xDB ","\xDF\xDF\xDB"," \xDB","\xDF\xDF\xDF"];
var six=["\xDC\xDC\xDC","\xDB ","\xDB\xDF\xDB","\xDB \xDB","\xDF\xDF\xDF"];
var seven=["\xDC\xDC\xDC"," \xDB"," \xDB"," \xDB"," \xDF"];
var eight=["\xDC\xDC\xDC","\xDB \xDB","\xDB\xDF\xDB","\xDB \xDB","\xDF\xDF\xDF"];
var nine=["\xDC\xDC\xDC","\xDB \xDB","\xDF\xDF\xDB"," \xDB"," \xDF"];
var colon=[" ","\xFE"," ","\xFE"," "];
this.digits[0]=zero;
this.digits[1]=one;
this.digits[2]=two;
this.digits[3]=three;
this.digits[4]=four;
this.digits[5]=five;
this.digits[6]=six;
this.digits[7]=seven;
this.digits[8]=eight;
this.digits[9]=nine;
this.digits["colon"]=colon;
}
this.Countdown=function(current,difference)
{
if(this.countdown<=0) return false;
this.countdown-=difference;
this.lastupdate=current;
return true;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment