Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
142 lines (128 sloc) 5.33 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Document Object MAYHEM!</title>
<script type="text/javascript" src="http://www.bbc.co.uk/glow/gloader.js"></script>
<script type="text/javascript">
gloader.load(["glow", "1", "glow.anim", "glow.net", "glow.dom"]);
</script>
<script type="text/javascript" src="domayhem.js"></script>
<script type="text/javascript" src="player.js"></script>
<script type="text/javascript" src="game.js"></script>
<script type="text/javascript">
var totalTurns = 100;
var playerTotalLife = 300;
var turnDelay = 500; // milliseconds
var actionDelay = 100; // milliseconds
var speechDelay = 900; // milliseconds
var varience = 10; // %
glow.onDomReady(function() {
deathmatch = new Game(glow.dom.get(".player"), totalTurns, turnDelay, actionDelay, speechDelay, varience, playerTotalLife);
deathmatch.init();
deathmatch.start();
});
</script>
<style>
.player { border: 1px solid red; padding: 5px; margin: 10px; float: left; }
.ammo { border: 1px solid red; padding: 5px; margin: 10px; }
#logs { font-size: 0.7em; position: absolute; right: 0px; width: 370px; padding: 10px; color: #777; font-family: courier;}
#logs h2 { }
#log { padding: 10px; border: 1px solid #aaa; color: #777; }
h1, h2 { margin: 0; }
#player--say { height: 20px; color: blue; font-size: 1.3em; font-family: Arial; }
</style>
</head>
<body>
<div id="logs">
<h2>Log:</h2>
<div id="log"></div>
</div>
<div class="settings">
<h1>Document Object MAYHEM!</h1>
<div>turn number: <span id="game--turn-number">?</span></div>
<div>turn delay: <span id="game--turn-delay">?</span> milliseconds</div>
<div>action delay: <span id="game--action-delay">?</span> milliseconds</div>
<div>speech delay: <span id="game--speech-delay">?</span> milliseconds</div>
<div>total players: <span id="game--total-players">?</span></div>
<div>active players: <span id="game--active-players">?</span></div>
<div>varience: <span id="game--varience-percent">?</span>%</div>
</div>
<div id="player-one" class="player">
<h2>Player '<span id="player--name">?</span>'</h2>
<h3 id="player--say"></h3>
<div class="settings">
<div>battlecry: <span id="player--battlecry">Fuck yeah!</span></div>
<div>dead: <span id="player--dead">?</span></div>
<div>selected: <span id="player--active">?</span></div>
<div>total ammo: <span id="player--total-ammo">?</span></div>
<div>turn ammo: <span id="player--turn-ammo">?</span></div>
<div>life total: <span id="player--life-total">?</span></div>
<div>life left: <span id="player--life-left">?</span></div>
<div>life percent: <span id="player--life-percent">?</span>%</div>
<div>damage inflicted: <span id="player--damage-inflicted">?</span></div>
<div>score: <span id="player--score">?</span></div>
</div>
<div class="ammo-case ammo-type-1">
<div class="ammo">one</div>
<div class="ammo">two</div>
<div class="ammo">three</div>
<div class="ammo">four</div>
</div>
</div>
<div id="player-two" class="player">
<h2>Player '<span id="player--name">?</span>'</h2>
<h3 id="player--say"></h3>
<div class="settings">
<div>battlecry: <span id="player--battlecry">I want biscuits!</span></div>
<div>dead: <span id="player--dead">?</span></div>
<div>selected: <span id="player--active">?</span></div>
<div>total ammo: <span id="player--total-ammo">?</span></div>
<div>turn ammo: <span id="player--turn-ammo">?</span></div>
<div>life total: <span id="player--life-total">?</span></div>
<div>life left: <span id="player--life-left">?</span></div>
<div>life percent: <span id="player--life-percent">?</span>%</div>
<div>damage inflicted: <span id="player--damage-inflicted">?</span></div>
<div>score: <span id="player--score">?</span></div>
</div>
<div class="ammo-case ammo-type-3">
<div class="ammo">five</div>
<div class="ammo">six</div>
<div class="ammo">seven</div>
<div class="ammo">eight</div>
<div class="ammo">nine</div>
<div class="ammo">ten</div>
<div class="ammo">eleven</div>
<div class="ammo">twelve</div>
<div class="ammo">thirteen</div>
<div class="ammo">fourteen</div>
<div class="ammo">fifteen</div>
<div class="ammo">sixteen</div>
<div class="ammo">seventeen</div>
<div class="ammo">eighteen</div>
<div class="ammo">nineteen</div>
<div class="ammo">twenty</div>
</div>
</div>
<div id="player-three" class="player">
<h2>Player '<span id="player--name">?</span>'</h2>
<h3 id="player--say"></h3>
<div class="settings">
<div>battlecry: <span id="player--battlecry">RAAWK!</span></div>
<div>dead: <span id="player--dead">?</span></div>
<div>selected: <span id="player--active">?</span></div>
<div>total ammo: <span id="player--total-ammo">?</span></div>
<div>turn ammo: <span id="player--turn-ammo">?</span></div>
<div>life total: <span id="player--life-total">?</span></div>
<div>life left: <span id="player--life-left">?</span></div>
<div>life percent: <span id="player--life-percent">?</span>%</div>
<div>damage inflicted: <span id="player--damage-inflicted">?</span></div>
<div>score: <span id="player--score">?</span></div>
</div>
<div class="ammo-case ammo-type-2">
<div class="ammo">twenty one</div>
</div>
</div>
</body>
</html>