diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..b645510 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +poker \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..217af47 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,23 @@ + + + + + + diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..e206d70 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..b27e8e5 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,23 @@ + + + + + + + + + + Python 2.7.5 (C:/Python27/python.exe) + + + + + + + + + diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..7414192 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml new file mode 100644 index 0000000..922003b --- /dev/null +++ b/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..def6a6a --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..2fa7981 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + 5050 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flash/alarmSound.fla b/flash/alarmSound.fla new file mode 100644 index 0000000..53efede Binary files /dev/null and b/flash/alarmSound.fla differ diff --git a/flash/alarmSound.html b/flash/alarmSound.html new file mode 100644 index 0000000..031bfc6 --- /dev/null +++ b/flash/alarmSound.html @@ -0,0 +1,318 @@ + + + +alarmSound + + + + + + + + + + diff --git a/flash/alarmSound.swf b/flash/alarmSound.swf new file mode 100644 index 0000000..9d6c5d7 Binary files /dev/null and b/flash/alarmSound.swf differ diff --git a/images/bg01.jpg b/images/bg01.jpg new file mode 100644 index 0000000..255ef23 Binary files /dev/null and b/images/bg01.jpg differ diff --git a/images/bg02.jpg b/images/bg02.jpg new file mode 100644 index 0000000..1004005 Binary files /dev/null and b/images/bg02.jpg differ diff --git a/images/bg02a.jpg b/images/bg02a.jpg new file mode 100644 index 0000000..ebea2cb Binary files /dev/null and b/images/bg02a.jpg differ diff --git a/images/bg02b.png b/images/bg02b.png new file mode 100644 index 0000000..8b9ad8a Binary files /dev/null and b/images/bg02b.png differ diff --git a/images/bg03.jpg b/images/bg03.jpg new file mode 100644 index 0000000..12fb699 Binary files /dev/null and b/images/bg03.jpg differ diff --git a/images/bg04.jpg b/images/bg04.jpg new file mode 100644 index 0000000..29cddb2 Binary files /dev/null and b/images/bg04.jpg differ diff --git a/images/blindBg01.png b/images/blindBg01.png new file mode 100644 index 0000000..11e0659 Binary files /dev/null and b/images/blindBg01.png differ diff --git a/images/btnBg01.png b/images/btnBg01.png new file mode 100644 index 0000000..14f0ccd Binary files /dev/null and b/images/btnBg01.png differ diff --git a/images/txtBg01.png b/images/txtBg01.png new file mode 100644 index 0000000..b7c6b7e Binary files /dev/null and b/images/txtBg01.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..c7eb21d --- /dev/null +++ b/index.html @@ -0,0 +1,63 @@ + + + + +Texas Hold'em Timer + + + + + + + + +
00
+
00
+ + + +
+ +
+ + +
+
+ + +
+ +
round...
+ +
Increase/Decrease blinds + + +
+ +
+ + + +
+ + + + diff --git a/js/timer5.js b/js/timer5.js new file mode 100644 index 0000000..9409770 --- /dev/null +++ b/js/timer5.js @@ -0,0 +1,383 @@ +// JavaScript Document +/* 0) + { + psw.seconds = (psw.nthSec % 10 == 0)? --psw.secondsTmp: psw.secondsTmp; + psw.secondsTmp = (psw.secondsTmp <= 0 && psw.nthSec == 1)? 60: psw.secondsTmp; + } + + psw.nthSec = (9 -(psw.tick % 10));//one seconds ticker; 0 = 1 second + psw.totalSec = (psw.nthSec % 10 == 0)? --psw.totalSec: psw.totalSec;//decrement total seconds + + psw.tick++; + + if(psw.minutes == 0 && psw.seconds == 0 && psw.nthSec == 1) + { + clearInterval(psw.timer); + psw.timer = null; + psw.newRound(); + } + } + + + psw.divSec.innerHTML = (psw.seconds < 10)? '0'+ psw.seconds: psw.seconds; + psw.divNthSec.innerHTML = (psw.nthSec < 10)? '0' + psw.nthSec: psw.nthSec; + psw.divMin.innerHTML = (psw.minutes < 10)? '0'+ psw.minutes: psw.minutes; + }; +psw.resetTimer = function() + { + clearInterval(psw.timer); + + psw.roundTime.disabled = false; + psw.startAmount.disabled = false; + psw.divMin.innerHTML = '00'; + psw.divSec.innerHTML = '00'; + psw.divNthSec.innerHTML = '00'; + psw.sBlind.innerHTML = '00'; + psw.bBlind.innerHTML = '00'; + psw.seconds = 0; + psw.secondsTmp = 60; + psw.totalSec = 0; + psw.minutes = 0; + psw.nthSec = 0; + psw.tick = 0; + psw.roundCount = 0; + psw.step = 0; + psw.divRndCount.innerHTML = 'round...' + psw.roundCount; + psw.startBtn.style.backgroundColor = '#090'; + + /* 'timer' called last to allow clearInterval() thread to complete */ + psw.timer = null; + + }; + + + + + + + + + +/* increment round counter, add up the blinds, play the new round alarm, and reset timer, for a new round */ +psw.newRound = function() + { + psw.tick = 0; + psw.nthSec = 0; + psw.seconds = 0; + psw.secondsTmp = 60; + psw.totalSec = 0; + psw.minutes = 0; + psw.step = parseInt(psw.step); + + psw.roundCount++; + + if(psw.roundCount <= 5) + { psw.smallB += psw.step; } + if(psw.roundCount >= 6 && psw.roundCount <= 8) + { psw.smallB = psw.smallB + (psw.step * 5); } + if(psw.roundCount >= 9 && psw.roundCount <= 10) + { psw.smallB = psw.smallB +(psw.step * 10); } + if(psw.roundCount >=11) + { psw.smallB = psw.smallB + (psw.step * 20); } + if(psw.roundCount > 100) + { psw.resetTimer(); } + + this.sBlind.innerHTML = psw.smallB; + this.bBlind.innerHTML = psw.smallB * 2; + + //nthSec = parseInt(roundTime.value / 60); + psw.minutes = parseInt(psw.roundTime.value % 60); + psw.totalSec = psw.minutes * 60; + + psw.divNthSec.innerHTML = (psw.nthSec < 10)? '0' + psw.nthSec: psw.nthSec; + psw.divSec.innerHTML = (psw.seconds < 10)? '0' + psw.seconds: psw.seconds; + psw.divMin.innerHTML = (psw.minutes < 10)? '0' + psw.minutes: psw.minutes; + psw.divRndCount.innerHTML = 'round...' + psw.roundCount; + + psw.playSound(); + + }; + + + + + + + + +/* allows user to manually increase/decrease the displayed blind amounts, during game play */ +psw.upBlinds = function() + { + var _sb = null; + var _bb = null; + + /* get current blind amounts */ + _sb = parseInt(psw.sBlind.innerHTML); + _bb = parseInt(psw.bBlind.innerHTML); + + /*null out values, else they're added like strings */ + psw.sBlind.innerHTML = null; + psw.bBlind.innerHTML = null; + + /*update display of blinds */ + if(_bb.toString().length <= 4 && _bb < 10000) + { + psw.sBlind.innerHTML = ((_sb + psw.stepHolder) < 10)? '0'+ (_sb + psw.stepHolder): (_sb + psw.stepHolder); + psw.bBlind.innerHTML = (((_sb + psw.stepHolder)*2) < 10)? '0'+ ((_sb + psw.stepHolder)*2): ((_sb + psw.stepHolder)*2); + } + else + { + psw.sBlind.innerHTML = _sb; + psw.bBlind.innerHTML = (_sb *2); + } + psw.smallB = Math.abs(psw.sBlind.innerHTML); + + }; +psw.downBlinds = function() + { + + /* get current blind amounts */ + var _sb = Math.abs(psw.sBlind.innerHTML); + var _bb = Math.abs(psw.bBlind.innerHTML); + + /* null out values, else they're added like strings */ + if(_bb.toString().length <= 5 && _bb > 0) + { + psw.sBlind.innerHTML = null; + psw.bBlind.innerHTML = null; + + /* update display of blinds */ + psw.sBlind.innerHTML = ((_sb - psw.stepHolder) < 10)? '0'+ (_sb - psw.stepHolder): (_sb - psw.stepHolder); + psw.bBlind.innerHTML = (((_sb - psw.stepHolder)*2) < 10)? '0'+ ((_sb - psw.stepHolder)*2): ((_sb - psw.stepHolder)*2); + + smallB = Math.abs(psw.sBlind.innerHTML); + } + else if(_bb <= 0) + { + psw.sBlind.innerHTML = null; + psw.bBlind.innerHTML = null; + + /* update display of blinds */ + psw.sBlind.innerHTML = (psw.stepHolder < 10)? '0'+ psw.stepHolder: psw.stepHolder; + psw.bBlind.innerHTML = (psw.stepHolder *2 < 10)? '0'+ psw.stepHolder * 2: psw.stepHolder * 2; + + psw.smallB = Math.abs(psw.sBlind.innerHTML); + } + }; + + + + + + + +/* new round alarm; plays trumpet sound */ +psw.playSound = function() + { + psw.makeSndObj(); + + var sndTimerID = setTimeout(stopSound, 5000); + + function stopSound() + { + var cancelSnd = document.getElementById('alarmSound'); + cancelSnd.parentNode.removeChild(cancelSnd); + + clearTimeout(sndTimerID); + + sndTimerID = 0; + psw.trumpetSnd.innerHTML = ''; + psw.trumpetSnd.style.display = 'none'; + psw.startStopTimer(); + } + }; +/* creates the flash based sound obj. +* and add/remove from DOM to start/stop it. +* inline scripting was the simplest way for IE/others to work. */ +psw.makeSndObj = function() + { + psw.trumpetSnd.style.display = 'block'; + psw.trumpetSnd.innerHTML = ''; + + }; + + + + +/* users can hit the spacebar to pause the timer, at any time during the game */ +psw.spaceBarPause = function() + { + window.onkeyup = function(e) + { + if(e.keyCode == 32) + { psw.startStopTimer(); } + } + }(); +/*]]>*/ + + diff --git a/mainStyle.css b/mainStyle.css new file mode 100644 index 0000000..73c4caf --- /dev/null +++ b/mainStyle.css @@ -0,0 +1,188 @@ +@charset "utf-8"; +/* CSS Document */ +*{ padding:0; margin:0; border:0; } +body +{ + + font-family:Arial, Helvetica, sans-serif; + font-size:10px; + background:#000; + background-image:url('images/bg02b.png'); + background-repeat:no-repeat; + background-size:100%; + background-attachment:fixed; + +} +.sBlind +{ + position:relative; + float:left; + font-size:15em; + margin:0.2em; + margin-left:1em; + padding-left:0.1em; + padding-right:0.1em; + background-image:url('images/blindBg01.png'); + background-repeat:repeat-x; + box-shadow: 1px 5px 5px #666; + + +} +.bBlind +{ + position:relative; + float:right; + font-size:15em; + margin:0.2em; + margin-right:1em; + margin-bottom:0.5em; + padding-left:0.1em; + padding-right:0.1em; + background-image:url('images/blindBg01.png'); + background-repeat:repeat-x; + box-shadow: 1px 5px 5px #666; +} + +#timer +{ + + clear:both; + position:relative; + width:260px; + margin:auto; + font-size:6em; + text-align:left; +} +#timer ul +{ + list-style:none; + display:inline; + position:relative; +} +#timer li +{ + float:left; + text-align:center; + color:#FFF; + padding:0 1px 0 1px; +} +.colon +{ + width:0.5em; + text-align:center; +} +#nthSec +{ + font-size:0.6em; + margin-top:0.6em; +} +#timerBtns +{ + position:relative; + width:35em; + margin:auto; + +} +#timerBtns button +{ + font-size:3em; + margin:0em 0.5em 0em 0.5em; + border-radius:0.3em; + cursor:pointer; +} + + +#startStop +{ + background:#090; + width:6em; + border:#333 solid 1px; + background-image:url('images/btnBg01.png'); + box-shadow: 3px 3px 5px #000; +} +#reset +{ + background:#FC0; + width:3.5em; + border:#333 solid 1px; + background-image:url('images/btnBg01.png'); + box-shadow: 3px 3px 5px #000; +} +#roundCount +{ + position:relative; + margin:auto; + margin-top:0.5em; + width:4em; + font-size:2em; + color:#999; + text-shadow: 2px 2px 2px #000; + +} +.changeBlindsBtns +{ + + position:relative; + width:12em; + margin:auto; + color:#CCC; + font-size:2em; + margin-top:1em; + margin-bottom:-0.5em; + padding:0.2em 0.5em 0.5em 0.5em; + text-align:center; + text-shadow: 2px 2px 2px #000; + background-image:url('images/txtBg01.png'); + background-repeat:repeat; + border-radius:1em; +} +#upBlinds +{ + cursor:pointer; + font-size:2em; + width:1.5em; + border-radius:0.3em; + border:#666 outset 2px; + box-shadow: 3px 3px 5px #000; + margin:-0.5em 0.5em 0em 0.5em; +} +#downBlinds +{ + cursor:pointer; + font-size:2em; + width:1.5em; + border-radius:0.3em; + border:#666 outset 2px; + box-shadow: 3px 3px 5px #000; + margin:0.1em 0.5em 0em 0.5em; + +} +.form +{ + position:relative; + width:50%; + margin:auto; + margin-top:2em; + font-size:2em; + color:#CCC; + text-shadow: 2px 2px 2px #000; + top:2em; + padding:0.5em; + background-image:url('images/txtBg01.png'); + background-repeat:repeat; + border-radius:1em; + +} +.form label +{ + display:block; +} +.form input +{ + float:right; + height:1.5em; + padding-left:0.5em; + border-radius:0.5em; +} +#footer { clear:both; } +/* #alarmSound { display:block; position:relative; width:1px; margin:auto; } */ \ No newline at end of file diff --git a/mainStyle_ie.css b/mainStyle_ie.css new file mode 100644 index 0000000..7c62fa7 --- /dev/null +++ b/mainStyle_ie.css @@ -0,0 +1,186 @@ +@charset "utf-8"; +/* CSS Document */ +*{ padding:0; margin:0; border:0; } +body +{ + + font-family:Arial, Helvetica, sans-serif; + font-size:10px; + background:#000; + background-image:url('images/bg02b.png'); + background-repeat:no-repeat; + background-size:100%; +} +.sBlind +{ + position:relative; + float:left; + font-size:15em; + margin:0.2em; + margin-left:1em; + padding-left:0.1em; + padding-right:0.1em; + background-image:url('images/blindBg01.png'); + background-repeat:repeat-x; + box-shadow: 1px 5px 5px #666; + + +} +.bBlind +{ + position:relative; + float:right; + font-size:15em; + margin:0.2em; + margin-right:1em; + margin-bottom:0.5em; + padding-left:0.1em; + padding-right:0.1em; + background-image:url('images/blindBg01.png'); + background-repeat:repeat-x; + box-shadow: 1px 5px 5px #666; +} + +#timer +{ + + clear:both; + position:relative; + width:260px; + margin:auto; + font-size:6em; + text-align:left; +} +#timer ul +{ + list-style:none; + display:inline; + position:relative; +} +#timer li +{ + float:left; + text-align:center; + color:#FFF; + padding:0 1px 0 1px; +} +.colon +{ + width:0.5em; + text-align:center; +} +#nthSec +{ + font-size:0.6em; + margin-top:0.6em; +} +#timerBtns +{ + position:relative; + width:35em; + margin:auto; + +} +#timerBtns button +{ + font-size:3em; + margin:0em 0.5em 0em 0.5em; + border-radius:0.3em; + cursor:pointer; +} + + +#startStop +{ + background:#090; + width:6em; + border:#333 solid 1px; + background-image:url('images/btnBg01.png'); + box-shadow: 3px 3px 5px #000; +} +#reset +{ + background:#FC0; + width:3.5em; + border:#333 solid 1px; + background-image:url('images/btnBg01.png'); + box-shadow: 3px 3px 5px #000; +} +#roundCount +{ + position:relative; + margin:auto; + margin-top:0.5em; + width:4em; + font-size:2em; + color:#999; + text-shadow: 2px 2px 2px #000; + +} +.changeBlindsBtns +{ + + position:relative; + width:12em; + margin:auto; + color:#CCC; + font-size:2em; + margin-top:1em; + margin-bottom:-0.5em; + padding:0.2em 0.5em 0.5em 0.5em; + text-align:center; + text-shadow: 2px 2px 2px #000; + background-image:url('images/txtBg01.png'); + background-repeat:repeat; + border-radius:1em; +} +#upBlinds +{ + cursor:pointer; + font-size:2em; + width:1.5em; + border-radius:0.3em; + border:#666 outset 2px; + box-shadow: 3px 3px 5px #000; + margin:-0.5em 0.5em 0em 0.5em; +} +#downBlinds +{ + cursor:pointer; + font-size:2em; + width:1.5em; + border-radius:0.3em; + border:#666 outset 2px; + box-shadow: 3px 3px 5px #000; + margin:0.1em 0.5em 0em 0.5em; + +} +.form +{ + position:relative; + width:50%; + margin:auto; + margin-top:2em; + font-size:2em; + color:#CCC; + text-shadow: 2px 2px 2px #000; + top:2em; + padding:0.5em; + background-image:url('images/txtBg01.png'); + background-repeat:repeat; + border-radius:1em; + +} +.form label +{ + display:block; +} +.form input +{ + float:right; + height:1.5em; + padding-left:0.5em; + border-radius:0.5em; +} +#footer { clear:both; } +/* #alarmSound { display:block; position:relative; width:1px; margin:auto; } */ \ No newline at end of file diff --git a/poker.iml b/poker.iml new file mode 100644 index 0000000..c854a41 --- /dev/null +++ b/poker.iml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/test.html b/test.html new file mode 100644 index 0000000..55c46ce --- /dev/null +++ b/test.html @@ -0,0 +1,17 @@ + + + + +Untitled Document + + + + + + + + + + + +