Fix links, move stuff around, update tic tac toe

This commit is contained in:
Sky Johnson 2024-06-29 08:44:42 -05:00
parent e3023f8b39
commit 12642f09e9
29 changed files with 1251 additions and 1108 deletions

View File

@ -13,7 +13,7 @@
private $db;
private $ThumbPath = "http://localhost:8888/Resources/Images/Thumbs/Show/";
private $ThumbPath = "http://localhost:8888//assets/images/Thumbs/Show/";

View File

@ -128,18 +128,18 @@
'<ul>',
'</ul>',
'<li>$1</li>',
'<img class="Emote" src=\'../Resources/Images/Icons/Emotes/Smile.gif\' />',
'<img class="Emote" src=\'../Resources/Images/Icons/Emotes/Blank.gif\' />',
'<img class="Emote" src=\'../Resources/Images/Icons/Emotes/Bomb.gif\' />',
'<img class="Emote" src=\'../Resources/Images/Icons/Emotes/Grin.gif\' />',
'<img class="Emote" src=\'../Resources/Images/Icons/Emotes/MegaSad.gif\' />',
'<img class="Emote" src=\'../Resources/Images/Icons/Emotes/Blank.gif\' />',
'<img class="Emote" src=\'../Resources/Images/Icons/Emotes/Huh.gif\' />',
'<img class="Emote" src=\'../Resources/Images/Icons/Emotes/Huh.gif\' />',
'<img class="Emote" src=\'../Resources/Images/Icons/Emotes/Huh.gif\' />',
'<img class="Emote" src=\'../Resources/Images/Icons/Emotes/Horror.gif\' />',
'<img class="Emote" src=\'/assets/images/Icons/Emotes/Smile.gif\' />',
'<img class="Emote" src=\'/assets/images/Icons/Emotes/Blank.gif\' />',
'<img class="Emote" src=\'/assets/images/Icons/Emotes/Bomb.gif\' />',
'<img class="Emote" src=\'/assets/images/Icons/Emotes/Grin.gif\' />',
'<img class="Emote" src=\'/assets/images/Icons/Emotes/MegaSad.gif\' />',
'<img class="Emote" src=\'/assets/images/Icons/Emotes/Blank.gif\' />',
'<img class="Emote" src=\'/assets/images/Icons/Emotes/Huh.gif\' />',
'<img class="Emote" src=\'/assets/images/Icons/Emotes/Huh.gif\' />',
'<img class="Emote" src=\'/assets/images/Icons/Emotes/Huh.gif\' />',
'<img class="Emote" src=\'/assets/images/Icons/Emotes/Horror.gif\' />',
'<pre class="forumCode"><span class="title"><span class="hdr">CODE</span> </span><p style="padding: 5px;">$1</p></pre>',
'<img class="Emote" src=\'../Resources/Images/Icons/Emotes/Tongue.gif\' />'
'<img class="Emote" src=\'/assets/images/Icons/Emotes/Tongue.gif\' />'
);
$rtrn = preg_replace($input, $output, $data);

View File

@ -145,7 +145,7 @@
if($first) {
echo <<<FIRST
<a class="latestArticle" href="{$Link}">
<img src="Resources/Images/Covers/BlogPosts/{$article->Cover}.png" alt="{$article->Title}" title="{$article->Title}" />
<img src="/assets/images/Covers/BlogPosts/{$article->Cover}.png" alt="{$article->Title}" title="{$article->Title}" />
{$cBox}
@ -159,7 +159,7 @@ FIRST;
} else {
echo <<<ARTICLE
<a class="article" href="{$Link}">
<img src="Resources/Images/Covers/BlogPosts/{$article->Cover}.png" />
<img src="/assets/images/Covers/BlogPosts/{$article->Cover}.png" />
{$cBox}

View File

@ -1,88 +0,0 @@
<?php
if(!empty($_COOKIE['MadSplashUser'])) {
$user = explode(" ", $_COOKIE['MadSplashUser']);
echo <<<SUPERNAV
<section id="SuperNav">
<div class="left" style="padding-left: 12px;">
Heyas, <a href="#">{$user[1]}</a>! You can go to your <a href="#">User CP</a> or <a href="http://localhost:8888/Resources/Scripts/PHP/Hubs/CommunityHub.php?user={$user[0]}&action=logout">logout</a>.
</div>
<div class="right">
<a class="YouTube" href="http://youtube.com/User/MadSplashTV" target="_blank">&nbsp;</a>
<a class="Twitter" href="http://twitter.com/MadSplashStudio" target="_blank">&nbsp;</a>
<div class="CrossNav">
<img src="../Resources/Images/Icons/General/CrossNavDark.png" style="width: 28px; height: 28px;" />
<ul>
<a href="http://therpg.madsplash.net/" target="_blank">
<li class="RPG">
<img src="../Resources/Images/Logos/TheRPG.png" style="width: 38px; float: left; margin-right: 4px; margin-top: 4px;" />
<a class="RPGLink">The RPG</a> <br />
Our up-and-coming web-and-text-based RPG. Play!
</li>
</a>
<li class="footer">
<div style="padding: 4px 8px;">
Follow us here, too: <br />
<div class="right">
<a class="YouTube" href="http://youtube.com/User/MadSplashTV" target="_blank">&nbsp;</a>
<a class="Twitter" href="http://twitter.com/MadSplashStudio" target="_blank">&nbsp;</a>
</div>
<div class="clear"> </div>
</div>
</li>
</ul>
</div>
</div>
</section>
SUPERNAV;
} else {
echo <<<SUPERNAV
<section id="SuperNav">
<div class="left" style="padding-left: 12px;">
Hey there, Guest. You can <a href="http://localhost:8888/community/index.php?page=login">login</a>
or <a href="http://localhost:8888/community/index.php?page=register">register</a> here.
</div>
<div class="right">
<a class="YouTube" href="http://youtube.com/User/MadSplashTV" target="_blank">&nbsp;</a>
<a class="Twitter" href="http://twitter.com/MadSplashStudio" target="_blank">&nbsp;</a>
<div class="CrossNav">
<img src="../Resources/Images/Icons/General/CrossNavDark.png" style="width: 28px; height: 28px;" />
<ul>
<a href="http://therpg.madsplash.net/" target="_blank">
<li class="RPG">
<img src="../Resources/Images/Logos/TheRPG.png" style="width: 38px; float: left; margin-right: 4px; margin-top: 4px;" />
<a class="RPGLink">The RPG</a> <br />
Our up-and-coming web-and-text-based RPG. Play!
</li>
</a>
<li class="footer">
<div style="padding: 4px 8px;">
Follow us here, too: <br />
<div class="right">
<a class="YouTube" href="http://youtube.com/User/MadSplashTV" target="_blank">&nbsp;</a>
<a class="Twitter" href="http://twitter.com/MadSplashStudio" target="_blank">&nbsp;</a>
</div>
<div class="clear"> </div>
</div>
</li>
</ul>
</div>
</div>
</section>
SUPERNAV;
}
?>

View File

@ -2,7 +2,7 @@
<div class="box">
<div style="padding-top: 8px;">
<section class="splash">
<img src="../Resources/Images/Logos/LogoV7B.png" style="width: 90%; display: block; margin: 0px auto; margin-bottom: -12px;" />
<img src="/assets/images/Logos/LogoV7B.png" style="width: 90%; display: block; margin: 0px auto; margin-bottom: -12px;" />
<a href="../index.php?page=privacy">Privacy</a> | <a href="../index.php?page=tandc">The T&amp;C</a> <br />
<p style="width: 200px; margin: 0px auto;">
Copyright &copy; 2014, Mad Splash. <br />

View File

@ -27,7 +27,7 @@
?>
<header>
<img class="Logo" src="../Resources/Images/Logos/LogoV7.png" alt="Mad Splash" title="Mad Splash!" />
<img class="Logo" src="/assets/images/Logos/LogoV7.png" alt="Mad Splash" title="Mad Splash!" />
<nav>
<ul>
@ -55,5 +55,5 @@
<section id="HBIG">
<h1>THE BLOG</h1>
<img src="../Resources/Images/General/SkyDrawn.png" style="position: absolute; right: 22px; top: 16px; float: right;" />
<img src="/assets/images/General/SkyDrawn.png" style="position: absolute; right: 22px; top: 16px; float: right;" />
</section>

View File

@ -2,7 +2,7 @@
$template = <<<TMP
<div id="articleComment">
<div class="left">
<img src="../Resources/Images/Avatars/{{{a}}}" alt="{{{u}}}" title="{{{u}}}" />
<img src="/assets/images/Avatars/{{{a}}}" alt="{{{u}}}" title="{{{u}}}" />
<a href="#">{{{u}}}</a>
</div>

View File

@ -5,9 +5,9 @@ $extra = <<<TMP
You're bona fide verified.
</h1>
<img src="../Resources/Images/General/SkyDrawn.png" style="float: right; position: absolute; right: 50px; bottom: 0px;" />
<img src="../Resources/Images/General/Batty1.png" style="float: left; position: absolute; left: 30px; top: 50px;" />
<img src="../Resources/Images/General/Car2.png" style="float: left; position: absolute; left: 80px; bottom: 20px; transform: rotate(24deg);
<img src="/assets/images/General/SkyDrawn.png" style="float: right; position: absolute; right: 50px; bottom: 0px;" />
<img src="/assets/images/General/Batty1.png" style="float: left; position: absolute; left: 30px; top: 50px;" />
<img src="/assets/images/General/Car2.png" style="float: left; position: absolute; left: 80px; bottom: 20px; transform: rotate(24deg);
-ms-transform: rotate(24deg);
-webkit-transform: rotate(24deg);" />

View File

@ -12,6 +12,6 @@ $extra = <<<TMP
Sorry about that...
</p>
<img src="../Resources/Images/General/TamakiSad.png" style="margin: 12px auto; display: block;" />
<img src="/assets/images/General/TamakiSad.png" style="margin: 12px auto; display: block;" />
TMP;
?>

View File

@ -2,7 +2,7 @@
<div class="box">
<div style="padding-top: 8px;">
<section class="splash">
<img src="../Resources/Images/Logos/LogoV7B.png" style="width: 90%; display: block; margin: 0px auto; margin-bottom: -12px;" />
<img src="/assets/images/Logos/LogoV7B.png" style="width: 90%; display: block; margin: 0px auto; margin-bottom: -12px;" />
<a href="../index.php?page=privacy">Privacy</a> | <a href="../index.php?page=tandc">The T&amp;C</a> <br />
<p style="width: 200px; margin: 0px auto;">
Copyright &copy; 2014, Mad Splash. <br />

View File

@ -35,7 +35,7 @@
?>
<header>
<img class="Logo" src="../Resources/Images/Logos/LogoV7.png" alt="Mad Splash" title="Mad Splash!" />
<img class="Logo" src="/assets/images/Logos/LogoV7.png" alt="Mad Splash" title="Mad Splash!" />
<nav>
<ul>

View File

@ -5,7 +5,7 @@
<section id="HBIG">
<h1>LOGIN</h1>
<img src="../Resources/Images/General/Cookie.png" style="position: absolute; right: 22px; top: 16px; float: right;" />
<img src="/assets/images/General/Cookie.png" style="position: absolute; right: 22px; top: 16px; float: right;" />
</section>
<section id="body">
@ -41,7 +41,7 @@
<div class="right" style="width: 560px;">
<h1 class="H1-2">Don't Have an Account?</h1>
<img src="../Resources/Images/General/Cookie.png" style="display: block; height: 280px; margin: 6px auto; margin-bottom: 16px;" />
<img src="/assets/images/General/Cookie.png" style="display: block; height: 280px; margin: 6px auto; margin-bottom: 16px;" />
<input class="blueButton" type="button" value="CREATE AN ACCOUNT" onClick="window.location.href='community.php?page=register'">
</div>

View File

@ -5,7 +5,7 @@
<section id="HBIG">
<h1>VERIFY</h1>
<img src="../Resources/Images/General/Cookie.png" style="position: absolute; right: 22px; top: 16px; float: right;" />
<img src="/assets/images/General/Cookie.png" style="position: absolute; right: 22px; top: 16px; float: right;" />
</section>
<section id="body">

View File

@ -6,7 +6,7 @@ $template = <<<TMP
html { background-color: #cacbca; }
body { width: 800px; margin: 0px auto; background-color: #cacbca; }
div#head { width: 100%; height: 200px; background: #4aa1ef url('http://localhost:8888/Resources/Images/Backgrounds/EmailHead.jpg'); margin-bottom: -48px; box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2); }
div#head { width: 100%; height: 200px; background: #4aa1ef url('http://localhost:8888//assets/images/Backgrounds/EmailHead.jpg'); margin-bottom: -48px; box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2); }
div#body { width: 82%; min-height: 70px; margin: 0px auto; margin-bottom: 20px; background-color: #fffffe; padding-bottom: 16px; }
h1 { color: #666; font: bold 28px Arial, Helvetica, Geneva, sans-serif; padding: 8px 0px 0px 12px; height: 20px; }
@ -20,7 +20,7 @@ $template = <<<TMP
<body>
<div id="head">
<img class="logo" src="http://localhost:8888/Resources/Images/Logos/NewLogo.png" />
<img class="logo" src="http://localhost:8888//assets/images/Logos/NewLogo.png" />
</div>

View File

@ -6,7 +6,7 @@ $template = <<<TMP
html { background-color: #cacbca; }
body { width: 800px; margin: 0px auto; background-color: #cacbca; }
div#head { width: 100%; height: 200px; background: #4aa1ef url('http://localhost:8888/Resources/Images/Backgrounds/EmailHead.jpg'); margin-bottom: -48px; box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2); }
div#head { width: 100%; height: 200px; background: #4aa1ef url('http://localhost:8888//assets/images/Backgrounds/EmailHead.jpg'); margin-bottom: -48px; box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2); }
div#body { width: 82%; min-height: 70px; margin: 0px auto; margin-bottom: 20px; background-color: #fffffe; padding-bottom: 16px; }
h1 { color: #666; font: bold 28px Arial, Helvetica, Geneva, sans-serif; padding: 8px 0px 0px 12px; height: 20px; }
@ -20,7 +20,7 @@ $template = <<<TMP
<body>
<div id="head">
<img class="logo" src="http://localhost:8888/Resources/Images/Logos/NewLogo.png" />
<img class="logo" src="http://localhost:8888//assets/images/Logos/NewLogo.png" />
</div>

View File

@ -2,7 +2,7 @@
<div class="box">
<div style="padding-top: 8px;">
<section class="splash">
<img src="Resources/Images/Logos/LogoV7B.png" style="width: 90%; display: block; margin: 0px auto; margin-bottom: -12px;" />
<img src="/assets/images/Logos/LogoV7B.png" style="width: 90%; display: block; margin: 0px auto; margin-bottom: -12px;" />
<a href="index.php?page=privacy">Privacy</a> | <a href="index.php?page=tandc">The T&amp;C</a> <br />
<p style="width: 200px; margin: 0px auto;">
Copyright &copy; 2014, Mad Splash. <br />

View File

@ -5,22 +5,22 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stuff, Community, Fun | Mad Splash!</title>
<link rel="stylesheet" href="Resources/CSS/MadSplash_v3.css" type="text/css" />
<link rel="stylesheet" href="../Resources/CSS/CustomFonts.css" type="text/css" />
<link rel="stylesheet" href="/assets/css/MadSplash_v3.css" type="text/css" />
<link rel="stylesheet" href="/assets/css/CustomFonts.css" type="text/css" />
<script src="Resources/Scripts/JavaScript/latestTweet.js"></script>
<script src="/assets/scripts/latestTweet.js"></script>
</head>
<body id="index" class="home">
<?php require_once '../app/supernav.php'; ?>
<?= render('supernav') ?>
<header>
<img class="Logo" src="Resources/Images/Logos/LogoV7.png" alt="Mad Splash" title="Mad Splash!" />
<img class="Logo" src="/assets/images/Logos/LogoV7.png" alt="Mad Splash" title="Mad Splash!" />
<nav>
<ul>
<li><a class="navLink" href="index.php">Home</a></li>
<li><a class="navLink" href="blog/blog.php">Blog</a></li>
<li><a class="navLink" href="/">Home</a></li>
<li><a class="navLink" href="/blog">Blog</a></li>
<li><a class="navLink" href="http://forums.madsplash.net/">Forums</a></li>
<li class="dropdown">

View File

@ -15,17 +15,6 @@
<section id="rightColumn">
<h1>Latest socials</h1>
<div id="tweets">
<a class="Twitter" style="background-color: #666; margin-right: 4px; float: left;">&nbsp;</a>
<div id="tweet" style="float: right;">
</div>
<div class="clear"> </div>
</div>
</section>
<div class="clear"> </div>

View File

@ -2,7 +2,7 @@
<div class="box">
<div style="padding-top: 8px;">
<section class="splash">
<img src="../Resources/Images/Logos/LogoV7B.png" style="width: 90%; display: block; margin: 0px auto; margin-bottom: -12px;" />
<img src="/assets/images/Logos/LogoV7B.png" style="width: 90%; display: block; margin: 0px auto; margin-bottom: -12px;" />
<a href="../index.php?page=privacy">Privacy</a> | <a href="../index.php?page=tandc">The T&amp;C</a> <br />
<p style="width: 200px; margin: 0px auto;">
Copyright &copy; 2014, Mad Splash. <br />

View File

@ -27,7 +27,7 @@
?>
<header>
<img class="Logo" src="../Resources/Images/Logos/LogoV7.png" alt="Mad Splash" title="Mad Splash!" />
<img class="Logo" src="/assets/images/Logos/LogoV7.png" alt="Mad Splash" title="Mad Splash!" />
<nav>
<ul>

View File

@ -5,8 +5,8 @@
<section id="HBIG">
<h1>PROJECTS</h1>
<img src="../Resources/Images/General/CC3.png" style="position: absolute; right: 22px; top: 16px; float: right;" />
<img src="../Resources/Images/General/Batty1.png" style="position: absolute; right: 200px; top: 4px; float: right;" />
<img src="/assets/images/General/CC3.png" style="position: absolute; right: 22px; top: 16px; float: right;" />
<img src="/assets/images/General/Batty1.png" style="position: absolute; right: 200px; top: 4px; float: right;" />
</section>
<section id="body">

View File

@ -1,6 +1,6 @@
<section id="slider">
<div class="slide" style="background: url('Resources/Images/Covers/Slides/NewLogoSlide.jpg') no-repeat top center;">
<div class="slide" style="background: url('/assets/images/Covers/Slides/NewLogoSlide.jpg') no-repeat center center; background-size: cover;">
<!--<a class="slideLink" href="http://the-rpg-makers.wikia.com/" target="_blank"
style="background: url('Resources/Images/Covers/SlideLinks/CIOButton.png') no-repeat top center;"></a>-->
style="background: url('/assets/images/Covers/SlideLinks/CIOButton.png') no-repeat top center;"></a>-->
</div>
</section>

45
app/templates/supernav.php Executable file
View File

@ -0,0 +1,45 @@
<section id="SuperNav">
<?php if(!empty($_COOKIE['MadSplashUser'])): ?>
<div class="left" style="padding-left: 12px;">
Heyas, <a href="#">{$user[1]}</a>! You can go to your <a href="#">User CP</a> or <a href="http://localhost:8888/Resources/Scripts/PHP/Hubs/CommunityHub.php?user={$user[0]}&action=logout">logout</a>.
</div>
<?php else: ?>
<div class="left" style="padding-left: 12px;">
Hey there, Guest. You can <a href="http://localhost:8888/community/index.php?page=login">login</a>
or <a href="http://localhost:8888/community/index.php?page=register">register</a> here.
</div>
<?php endif; ?>
<div class="right">
<a class="YouTube" href="http://youtube.com/User/MadSplashTV" target="_blank">&nbsp;</a>
<a class="Twitter" href="http://twitter.com/MadSplashStudio" target="_blank">&nbsp;</a>
<div class="CrossNav">
<img src="/assets/images/Icons/General/CrossNavDark.png" style="width: 28px; height: 28px;" />
<ul>
<a href="http://therpg.madsplash.net/" target="_blank">
<li class="RPG">
<img src="/assets/images/Logos/TheRPG.png" style="width: 38px; float: left; margin-right: 4px; margin-top: 4px;" />
<a class="RPGLink">The RPG</a> <br />
Our up-and-coming web-and-text-based RPG. Play!
</li>
</a>
<li class="footer">
<div style="padding: 4px 8px;">
Follow us here, too: <br />
<div class="right">
<a class="YouTube" href="http://youtube.com/User/MadSplashTV" target="_blank">&nbsp;</a>
<a class="Twitter" href="http://twitter.com/MadSplashStudio" target="_blank">&nbsp;</a>
</div>
<div class="clear"> </div>
</div>
</li>
</ul>
</div>
</div>
</section>

495
app/templates/tictactoe.php Normal file
View File

@ -0,0 +1,495 @@
<script>
if (document.all || document.getElementById) {
document.write('<style>.tictac{')
document.write('width:50px;height:50px;')
document.write('}</style>')
}
var sqr1
var sqr2
var sqr3
var sqr4
var sqr5
var sqr6
var sqr7
var sqr8
var sqr9
var sqr1T = 0
var sqr2T = 0
var sqr3T = 0
var sqr4T = 0
var sqr5T = 0
var sqr6T = 0
var sqr7T = 0
var sqr8T = 0
var sqr9T = 0
var moveCount = 0
var turn = 0
var mode = 1
function vari() {
sqr1 = document.tic.sqr1.value
sqr2 = document.tic.sqr2.value
sqr3 = document.tic.sqr3.value
sqr4 = document.tic.sqr4.value
sqr5 = document.tic.sqr5.value
sqr6 = document.tic.sqr6.value
sqr7 = document.tic.sqr7.value
sqr8 = document.tic.sqr8.value
sqr9 = document.tic.sqr9.value
}
function check() {
if (sqr1 == " X " && sqr2 == " X " && sqr3 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
} else if (sqr4 == " X " && sqr5 == " X " && sqr6 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
} else if (sqr7 == " X " && sqr8 == " X " && sqr9 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
} else if (sqr1 == " X " && sqr5 == " X " && sqr9 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
} else if (sqr1 == " X " && sqr4 == " X " && sqr7 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
} else if (sqr2 == " X " && sqr5 == " X " && sqr8 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
} else if (sqr3 == " X " && sqr6 == " X " && sqr9 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
} else if (sqr1 == " X " && sqr5 == " X " && sqr9 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
} else if (sqr3 == " X " && sqr5 == " X " && sqr7 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
} else {
winCheck()
check2()
drawCheck()
}
}
function check2() {
vari()
drawCheck()
if (sqr1 == " O " && sqr2 == " O " && sqr3 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
} else if (sqr4 == " O " && sqr5 == " O " && sqr6 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
} else if (sqr7 == " O " && sqr8 == " O " && sqr9 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
} else if (sqr1 == " O " && sqr5 == " O " && sqr9 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
} else if (sqr1 == " O " && sqr4 == " O " && sqr7 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
} else if (sqr2 == " O " && sqr5 == " O " && sqr8 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
} else if (sqr3 == " O " && sqr6 == " O " && sqr9 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
} else if (sqr1 == " O " && sqr5 == " O " && sqr9 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
} else if (sqr3 == " O " && sqr5 == " O " && sqr7 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
}
}
function player1Check() {
if (sqr1 == " X " && sqr2 == " X " && sqr3 == " X ") {
alert("Woot! Player 1 has won!")
reset()
} else if (sqr4 == " X " && sqr5 == " X " && sqr6 == " X ") {
alert("Woot! Player 1 has won!")
reset()
} else if (sqr7 == " X " && sqr8 == " X " && sqr9 == " X ") {
alert("Woot! Player 1 has won!")
reset()
} else if (sqr1 == " X " && sqr5 == " X " && sqr9 == " X ") {
alert("Woot! Player 1 has won!")
reset()
} else if (sqr1 == " X " && sqr4 == " X " && sqr7 == " X ") {
alert("Woot! Player 1 has won!")
reset()
} else if (sqr2 == " X " && sqr5 == " X " && sqr8 == " X ") {
alert("Woot! Player 1 has won!")
reset()
} else if (sqr3 == " X " && sqr6 == " X " && sqr9 == " X ") {
alert("Woot! Player 1 has won!")
reset()
} else if (sqr1 == " X " && sqr5 == " X " && sqr9 == " X ") {
alert("Woot! Player 1 has won!")
reset()
} else if (sqr3 == " X " && sqr5 == " X " && sqr7 == " X ") {
alert("Woot! Player 1 has won!")
reset()
} else {
player2Check()
drawCheck()
}
}
function player2Check() {
vari()
drawCheck()
if (sqr1 == " O " && sqr2 == " O " && sqr3 == " O ") {
alert("Blast. Player 2 has won.")
reset()
} else if (sqr4 == " O " && sqr5 == " O " && sqr6 == " O ") {
alert("Blast. Player 2 has won.")
reset()
} else if (sqr7 == " O " && sqr8 == " O " && sqr9 == " O ") {
alert("Blast. Player 2 has won.")
reset()
} else if (sqr1 == " O " && sqr5 == " O " && sqr9 == " O ") {
alert("Blast. Player 2 has won.")
reset()
} else if (sqr1 == " O " && sqr4 == " O " && sqr7 == " O ") {
alert("Blast. Player 2 has won.")
reset()
} else if (sqr2 == " O " && sqr5 == " O " && sqr8 == " O ") {
alert("Blast. Player 2 has won.")
reset()
} else if (sqr3 == " O " && sqr6 == " O " && sqr9 == " O ") {
alert("Blast. Player 2 has won.")
reset()
} else if (sqr1 == " O " && sqr5 == " O " && sqr9 == " O ") {
alert("Blast. Player 2 has won.")
reset()
} else if (sqr3 == " O " && sqr5 == " O " && sqr7 == " O ") {
alert("Blast. Player 2 has won.")
reset()
}
}
function drawCheck() {
vari()
moveCount = sqr1T + sqr2T + sqr3T + sqr4T + sqr5T + sqr6T + sqr7T + sqr8T + sqr9T
if (moveCount == 9) {
reset()
alert("You tied with the computer. Try harder next time!")
}
}
function winCheck() {
check2()
if (sqr1 == " O " && sqr2 == " O " && sqr3T == 0 && turn == 1) {
document.tic.sqr3.value = " O "
sqr3T = 1;
turn = 0;
} else if (sqr2 == " O " && sqr3 == " O " && sqr1T == 0 && turn == 1) {
document.tic.sqr1.value = " O "
sqr1T = 1;
turn = 0;
} else if (sqr4 == " O " && sqr5 == " O " && sqr6T == 0 && turn == 1) {
document.tic.sqr6.value = " O "
sqr6T = 1;
turn = 0;
} else if (sqr5 == " O " && sqr6 == " O " && sqr4T == 0 && turn == 1) {
document.tic.sqr4.value = " O "
sqr4T = 1;
turn = 0;
} else if (sqr7 == " O " && sqr8 == " O " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
} else if (sqr8 == " O " && sqr9 == " O " && sqr7T == 0 && turn == 1) {
document.tic.sqr7.value = " O "
sqr7T = 1;
turn = 0;
} else if (sqr1 == " O " && sqr5 == " O " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
} else if (sqr5 == " O " && sqr9 == " O " && sqr1T == 0 && turn == 1) {
document.tic.sqr1.value = " O "
sqr1T = 1;
turn = 0;
} else if (sqr3 == " O " && sqr5 == " O " && sqr7T == 0 && turn == 1) {
document.tic.sqr7.value = " O "
sqr7T = 1;
turn = 0;
} else if (sqr7 == " O " && sqr5 == " O " && sqr3T == 0 && turn == 1) {
document.tic.sqr3.value = " O "
sqr3T = 1;
turn = 0;
} else if (sqr1 == " O " && sqr3 == " O " && sqr2T == 0 && turn == 1) {
document.tic.sqr2.value = " O "
sqr2T = 1;
turn = 0;
} else if (sqr4 == " O " && sqr6 == " O " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
} else if (sqr7 == " O " && sqr9 == " O " && sqr8T == 0 && turn == 1) {
document.tic.sqr8.value = " O "
sqr8T = 1;
turn = 0;
} else if (sqr1 == " O " && sqr7 == " O " && sqr4T == 0 && turn == 1) {
document.tic.sqr4.value = " O "
sqr4T = 1;
turn = 0;
} else if (sqr2 == " O " && sqr8 == " O " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
} else if (sqr3 == " O " && sqr9 == " O " && sqr6T == 0 && turn == 1) {
document.tic.sqr6.value = " O "
sqr6T = 1;
turn = 0;
} else if (sqr1 == " O " && sqr5 == " O " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
} else if (sqr4 == " O " && sqr7 == " O " && sqr1T == 0 && turn == 1) {
document.tic.sqr1.value = " O "
sqr1T = 1;
turn = 0;
} else if (sqr5 == " O " && sqr8 == " O " && sqr2T == 0 && turn == 1) {
document.tic.sqr2.value = " O "
sqr2T = 1;
turn = 0;
} else if (sqr6 == " O " && sqr9 == " O " && sqr3T == 0 && turn == 1) {
document.tic.sqr3.value = " O "
sqr3T = 1;
turn = 0;
} else if (sqr1 == " O " && sqr4 == " O " && sqr7T == 0 && turn == 1) {
document.tic.sqr7.value = " O "
sqr7T = 1;
turn = 0;
} else if (sqr2 == " O " && sqr5 == " O " && sqr8T == 0 && turn == 1) {
document.tic.sqr8.value = " O "
sqr8T = 1;
turn = 0;
} else if (sqr3 == " O " && sqr6 == " O " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
} else if (sqr1 == " O " && sqr9 == " O " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
} else if (sqr3 == " O " && sqr7 == " O " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
} else {
computer()
}
check2()
}
function computer() {
check2()
if (sqr1 == " X " && sqr2 == " X " && sqr3T == 0 && turn == 1) {
document.tic.sqr3.value = " O "
sqr3T = 1;
turn = 0;
} else if (sqr2 == " X " && sqr3 == " X " && sqr1T == 0 && turn == 1) {
document.tic.sqr1.value = " O "
sqr1T = 1;
turn = 0;
} else if (sqr4 == " X " && sqr5 == " X " && sqr6T == 0 && turn == 1) {
document.tic.sqr6.value = " O "
sqr6T = 1;
turn = 0;
} else if (sqr5 == " X " && sqr6 == " X " && sqr4T == 0 && turn == 1) {
document.tic.sqr4.value = " O "
sqr4T = 1;
turn = 0;
} else if (sqr7 == " X " && sqr8 == " X " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
} else if (sqr8 == " X " && sqr9 == " X " && sqr7T == 0 && turn == 1) {
document.tic.sqr7.value = " O "
sqr7T = 1;
turn = 0;
} else if (sqr1 == " X " && sqr5 == " X " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
} else if (sqr5 == " X " && sqr9 == " X " && sqr1T == 0 && turn == 1) {
document.tic.sqr1.value = " O "
sqr1T = 1;
turn = 0;
} else if (sqr3 == " X " && sqr5 == " X " && sqr7T == 0 && turn == 1) {
document.tic.sqr7.value = " O "
sqr7T = 1;
turn = 0;
} else if (sqr7 == " X " && sqr5 == " X " && sqr3T == 0 && turn == 1) {
document.tic.sqr3.value = " O "
sqr3T = 1;
turn = 0;
} else if (sqr1 == " X " && sqr3 == " X " && sqr2T == 0 && turn == 1) {
document.tic.sqr2.value = " O "
sqr2T = 1;
turn = 0;
} else if (sqr4 == " X " && sqr6 == " X " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
} else if (sqr7 == " X " && sqr9 == " X " && sqr8T == 0 && turn == 1) {
document.tic.sqr8.value = " O "
sqr8T = 1;
turn = 0;
} else if (sqr1 == " X " && sqr7 == " X " && sqr4T == 0 && turn == 1) {
document.tic.sqr4.value = " O "
sqr4T = 1;
turn = 0;
} else if (sqr2 == " X " && sqr8 == " X " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
} else if (sqr3 == " X " && sqr9 == " X " && sqr6T == 0 && turn == 1) {
document.tic.sqr6.value = " O "
sqr6T = 1;
turn = 0;
} else if (sqr1 == " X " && sqr5 == " X " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
} else if (sqr4 == " X " && sqr7 == " X " && sqr1T == 0 && turn == 1) {
document.tic.sqr1.value = " O "
sqr1T = 1;
turn = 0;
} else if (sqr5 == " X " && sqr8 == " X " && sqr2T == 0 && turn == 1) {
document.tic.sqr2.value = " O "
sqr2T = 1;
turn = 0;
} else if (sqr6 == " X " && sqr9 == " X " && sqr3T == 0 && turn == 1) {
document.tic.sqr3.value = " O "
sqr3T = 1;
turn = 0;
} else if (sqr1 == " X " && sqr4 == " X " && sqr7T == 0 && turn == 1) {
document.tic.sqr7.value = " O "
sqr7T = 1;
turn = 0;
} else if (sqr2 == " X " && sqr5 == " X " && sqr8T == 0 && turn == 1) {
document.tic.sqr8.value = " O "
sqr8T = 1;
turn = 0;
} else if (sqr3 == " X " && sqr6 == " X " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
} else if (sqr1 == " X " && sqr9 == " X " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
} else if (sqr3 == " X " && sqr7 == " X " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
} else {
AI()
}
check2()
}
function AI() {
vari()
if (document.tic.sqr5.value == " " && turn == 1) {
document.tic.sqr5.value = " O "
turn = 0
sqr5T = 1
} else if (document.tic.sqr1.value == " " && turn == 1) {
document.tic.sqr1.value = " O "
turn = 0
sqr1T = 1
} else if (document.tic.sqr9.value == " " && turn == 1) {
document.tic.sqr9.value = " O "
turn = 0
sqr9T = 1
} else if (document.tic.sqr6.value == " " && turn == 1) {
document.tic.sqr6.value = " O "
turn = 0
sqr6T = 1
} else if (document.tic.sqr2.value == " " && turn == 1) {
document.tic.sqr2.value = " O "
turn = 0
sqr2T = 1
} else if (document.tic.sqr8.value == " " && turn == 1) {
document.tic.sqr8.value = " O "
turn = 0
sqr8T = 1
} else if (document.tic.sqr3.value == " " && turn == 1) {
document.tic.sqr3.value = " O "
turn = 0
sqr3T = 1
} else if (document.tic.sqr7.value == " " && turn == 1) {
document.tic.sqr7.value = " O "
turn = 0
sqr7T = 1
} else if (document.tic.sqr4.value == " " && turn == 1) {
document.tic.sqr4.value = " O "
turn = 0
sqr4T = 1
}
check2()
}
function reset() {
document.tic.sqr1.value = " "
document.tic.sqr2.value = " "
document.tic.sqr3.value = " "
document.tic.sqr4.value = " "
document.tic.sqr5.value = " "
document.tic.sqr6.value = " "
document.tic.sqr7.value = " "
document.tic.sqr8.value = " "
document.tic.sqr9.value = " "
sqr1T = 0
sqr2T = 0
sqr3T = 0
sqr4T = 0
sqr5T = 0
sqr6T = 0
sqr7T = 0
sqr8T = 0
sqr9T = 0
vari()
turn = 0
moveCount = 0
}
function resetter() {
reset()
}
</script>
<section id="cover">
<div class="cover" style="background-image: url('/assets/images/Covers/BlogPosts/BlueCheckers.png');"> </div>
</section>
<section id="body">
<div style="width: 100%; margin-bottom: 4px; height: 1px;">&nbsp;</div>
<h1>Set's Tic-Tac-Toe</h1>
<form name="tic" style="width: 50%; display: block; margin: 0px auto; padding: 12px 0px;">
<center>
<input type="button" name="sqr1" class="tictac" value=" " onClick="if(document.tic.sqr1.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr1.value = ' X '; sqr1T = 1; turn = 1; vari(); check();} else if(document.tic.sqr1.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr1.value = ' X '; sqr1T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr1.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr1.value = ' O '; sqr1T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<input type="button" name="sqr2" class="tictac" value=" " onClick="if(document.tic.sqr2.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr2.value = ' X '; sqr2T = 1; turn = 1; vari(); check();} else if(document.tic.sqr2.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr2.value = ' X '; sqr2T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr2.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr2.value = ' O '; sqr2T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<input type="button" name="sqr3" class="tictac" value=" " onClick="if(document.tic.sqr3.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr3.value = ' X '; sqr3T = 1; turn = 1; vari(); check();} else if(document.tic.sqr3.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr3.value = ' X '; sqr3T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr3.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr3.value = ' O '; sqr3T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT><br />
<input type="button" name="sqr4" class="tictac" value=" " onClick="if(document.tic.sqr4.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr4.value = ' X '; sqr4T = 1; turn = 1; vari(); check();} else if(document.tic.sqr4.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr4.value = ' X '; sqr4T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr4.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr4.value = ' O '; sqr4T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<input type="button" name="sqr5" class="tictac" value=" " onClick="if(document.tic.sqr5.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr5.value = ' X '; sqr5T = 1; turn = 1; vari(); check();} else if(document.tic.sqr5.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr5.value = ' X '; sqr5T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr5.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr5.value = ' O '; sqr5T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<input type="button" name="sqr6" class="tictac" value=" " onClick="if(document.tic.sqr6.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr6.value = ' X '; sqr6T = 1; turn = 1; vari(); check();} else if(document.tic.sqr6.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr6.value = ' X '; sqr6T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr6.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr6.value = ' O '; sqr6T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT><br />
<input type="button" name="sqr7" class="tictac" value=" " onClick="if(document.tic.sqr7.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr7.value = ' X '; sqr7T = 1; turn = 1; vari(); check();} else if(document.tic.sqr7.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr7.value = ' X '; sqr7T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr7.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr7.value = ' O '; sqr7T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<input type="button" name="sqr8" class="tictac" value=" " onClick="if(document.tic.sqr8.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr8.value = ' X '; sqr8T = 1; turn = 1; vari(); check();} else if(document.tic.sqr8.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr8.value = ' X '; sqr8T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr8.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr8.value = ' O '; sqr8T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<input type="button" name="sqr9" class="tictac" value=" " onClick="if(document.tic.sqr9.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr9.value = ' X '; sqr9T = 1; turn = 1; vari(); check();} else if(document.tic.sqr9.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr9.value = ' X '; sqr9T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr9.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr9.value = ' O '; sqr9T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
</center>
</form>
</section>

View File

@ -1,56 +1,56 @@
@font-face {
font-family: 'Bebas';
src: url('../Fonts/BebasNeue-webfont.eot');
src: url('../Fonts/BebasNeue-webfont.eot?#iefix') format('embedded-opentype'),
url('../Fonts/BebasNeue-webfont.woff') format('woff'),
url('../Fonts/BebasNeue-webfont.ttf') format('truetype'),
url('../Fonts/BebasNeue-webfont.svg#BebasNeueRegular') format('svg');
src: url('/assets/fonts/BebasNeue-webfont.eot');
src: url('/assets/fonts/BebasNeue-webfont.eot?#iefix') format('embedded-opentype'),
url('/assets/fonts/BebasNeue-webfont.woff') format('woff'),
url('/assets/fonts/BebasNeue-webfont.ttf') format('truetype'),
url('/assets/fonts/BebasNeue-webfont.svg#BebasNeueRegular') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "Minecraft";
src: url("../Fonts/Minecraft_font.eot?") format("eot"),
url("../Fonts/Minecraft_font.woff") format("woff"),
url("../Fonts/Minecraft_font.ttf") format("truetype"),
url("../Fonts/Minecraft_font.svg#Minecraft") format("svg");
src: url("/assets/fonts/Minecraft_font.eot?") format("eot"),
url("/assets/fonts/Minecraft_font.woff") format("woff"),
url("/assets/fonts/Minecraft_font.ttf") format("truetype"),
url("/assets/fonts/Minecraft_font.svg#Minecraft") format("svg");
font-weight:normal;
font-style:normal;
}
@font-face {
font-family: 'Candara';
src: url('../Fonts/candara-webfont.eot');
src: url('../Fonts/candara-webfont.eot?#iefix') format('embedded-opentype'),
url('../Fonts/candara-webfont.woff') format('woff'),
url('../Fonts/candara-webfont.ttf') format('truetype'),
url('../Fonts/candara-webfont.svg#CandaraRegular') format('svg');
src: url('/assets/fonts/candara-webfont.eot');
src: url('/assets/fonts/candara-webfont.eot?#iefix') format('embedded-opentype'),
url('/assets/fonts/candara-webfont.woff') format('woff'),
url('/assets/fonts/candara-webfont.ttf') format('truetype'),
url('/assets/fonts/candara-webfont.svg#CandaraRegular') format('svg');
}
@font-face {
font-family: 'CandaraB';
src: url('../Fonts/candarab-webfont.eot');
src: url('../Fonts/candarab-webfont.eot?#iefix') format('embedded-opentype'),
url('../Fonts/candarab-webfont.woff') format('woff'),
url('../Fonts/candarab-webfont.ttf') format('truetype'),
url('../Fonts/candarab-webfont.svg#CandaraBold') format('svg');
src: url('/assets/fonts/candarab-webfont.eot');
src: url('/assets/fonts/candarab-webfont.eot?#iefix') format('embedded-opentype'),
url('/assets/fonts/candarab-webfont.woff') format('woff'),
url('/assets/fonts/candarab-webfont.ttf') format('truetype'),
url('/assets/fonts/candarab-webfont.svg#CandaraBold') format('svg');
}
@font-face {
font-family: 'Handwriting';
src: url('../Fonts/SF_Arch_Rival-webfont.eot');
src: url('../Fonts/SF_Arch_Rival-webfont.eot?#iefix') format('embedded-opentype'),
url('../Fonts/SF_Arch_Rival-webfont.woff') format('woff'),
url('../Fonts/SF_Arch_Rival-webfont.ttf') format('truetype'),
url('../Fonts/SF_Arch_Rival-webfont.svg#sf_arch_rivalregular') format('svg');
src: url('/assets/fonts/SF_Arch_Rival-webfont.eot');
src: url('/assets/fonts/SF_Arch_Rival-webfont.eot?#iefix') format('embedded-opentype'),
url('/assets/fonts/SF_Arch_Rival-webfont.woff') format('woff'),
url('/assets/fonts/SF_Arch_Rival-webfont.ttf') format('truetype'),
url('/assets/fonts/SF_Arch_Rival-webfont.svg#sf_arch_rivalregular') format('svg');
}
@font-face {
font-family: 'ZeroNero';
src: url('../Fonts/zeronero-webfont.eot');
src: url('../Fonts/zeronero-webfont.eot?#iefix') format('embedded-opentype'),
url('../Fonts/zeronero-webfont.woff') format('woff'),
url('../Fonts/zeronero-webfont.ttf') format('truetype'),
url('../Fonts/zeronero-webfont.svg#zeroneroblack') format('svg');
src: url('/assets/fonts/zeronero-webfont.eot');
src: url('/assets/fonts/zeronero-webfont.eot?#iefix') format('embedded-opentype'),
url('/assets/fonts/zeronero-webfont.woff') format('woff'),
url('/assets/fonts/zeronero-webfont.ttf') format('truetype'),
url('/assets/fonts/zeronero-webfont.svg#zeroneroblack') format('svg');
}

View File

@ -3,26 +3,16 @@
$DM = new DisplayModule();
const PAGES = ['home', 'tandc', 'privacy', 'tictactoe'];
echo render('header');
if (!empty($_GET['page'])) {
$page = "home";
$TmpPage = basename($_GET['page']);
// If it's not a disallowed path, and if the file exists, update $page
if (!in_array($TmpPage, $LockedPages) && file_exists("Pieces/{$TmpPage}.htm")) {
$page = $TmpPage;
}
} else {
$page = "home";
}
$page = !empty($_GET['page']) && in_array($_GET['page'], PAGES) ? $_GET['page'] : 'home';
if($page == "home") {
echo render('slider');
}
// Include $page
echo render($page);
echo render('footer');

552
test.html
View File

@ -1,24 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Mad Splash! - Stuffs, Community, Fun</title>
<link rel="stylesheet" href="Resources/CSS/MadSplash_v3.css" type="text/css" />
<script src="Resources/Scripts/JavaScript/latestTweet.js"></script>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--[if lte IE 7]>
<script src="js/IE8.js" type="text/javascript"></script><![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="Resources/CSS/ie6.css"/><![endif]-->
<SCRIPT>
if (document.all||document.getElementById){
<script>
if (document.all || document.getElementById) {
document.write('<style>.tictac{')
document.write('width:50px;height:50px;')
document.write('}</style>')
@ -46,8 +27,7 @@
var turn = 0
var mode = 1
function vari()
{
function vari() {
sqr1 = document.tic.sqr1.value
sqr2 = document.tic.sqr2.value
sqr3 = document.tic.sqr3.value
@ -58,600 +38,402 @@
sqr8 = document.tic.sqr8.value
sqr9 = document.tic.sqr9.value
}
function check()
{
if(sqr1 == " X " && sqr2 == " X " && sqr3 == " X ")
{
function check() {
if (sqr1 == " X " && sqr2 == " X " && sqr3 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
}
else if(sqr4 == " X " && sqr5 == " X " && sqr6 == " X ")
{
} else if (sqr4 == " X " && sqr5 == " X " && sqr6 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
}
else if(sqr7 == " X " && sqr8 == " X " && sqr9 == " X ")
{
} else if (sqr7 == " X " && sqr8 == " X " && sqr9 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
}
else if(sqr1 == " X " && sqr5 == " X " && sqr9 == " X ")
{
} else if (sqr1 == " X " && sqr5 == " X " && sqr9 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
}
else if(sqr1 == " X " && sqr4 == " X " && sqr7 == " X ")
{
} else if (sqr1 == " X " && sqr4 == " X " && sqr7 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
}
else if(sqr2 == " X " && sqr5 == " X " && sqr8 == " X ")
{
} else if (sqr2 == " X " && sqr5 == " X " && sqr8 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
}
else if(sqr3 == " X " && sqr6 == " X " && sqr9 == " X ")
{
} else if (sqr3 == " X " && sqr6 == " X " && sqr9 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
}
else if(sqr1 == " X " && sqr5 == " X " && sqr9 == " X ")
{
} else if (sqr1 == " X " && sqr5 == " X " && sqr9 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
}
else if(sqr3 == " X " && sqr5 == " X " && sqr7 == " X ")
{
} else if (sqr3 == " X " && sqr5 == " X " && sqr7 == " X ") {
alert("Congrats, you've beat the computer!")
reset()
}
else
{
} else {
winCheck()
check2()
drawCheck()
}
}
function check2()
{
function check2() {
vari()
drawCheck()
if(sqr1 == " O " && sqr2 == " O " && sqr3 == " O ")
{
if (sqr1 == " O " && sqr2 == " O " && sqr3 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
}
else if(sqr4 == " O " && sqr5 == " O " && sqr6 == " O ")
{
} else if (sqr4 == " O " && sqr5 == " O " && sqr6 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
}
else if(sqr7 == " O " && sqr8 == " O " && sqr9 == " O ")
{
} else if (sqr7 == " O " && sqr8 == " O " && sqr9 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
}
else if(sqr1 == " O " && sqr5 == " O " && sqr9 == " O ")
{
} else if (sqr1 == " O " && sqr5 == " O " && sqr9 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
}
else if(sqr1 == " O " && sqr4 == " O " && sqr7 == " O ")
{
} else if (sqr1 == " O " && sqr4 == " O " && sqr7 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
}
else if(sqr2 == " O " && sqr5 == " O " && sqr8 == " O ")
{
} else if (sqr2 == " O " && sqr5 == " O " && sqr8 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
}
else if(sqr3 == " O " && sqr6 == " O " && sqr9 == " O ")
{
} else if (sqr3 == " O " && sqr6 == " O " && sqr9 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
}
else if(sqr1 == " O " && sqr5 == " O " && sqr9 == " O ")
{
} else if (sqr1 == " O " && sqr5 == " O " && sqr9 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
}
else if(sqr3 == " O " && sqr5 == " O " && sqr7 == " O ")
{
} else if (sqr3 == " O " && sqr5 == " O " && sqr7 == " O ") {
alert("Unfortunately, you've lost. Try again!")
reset()
}
}
function player1Check()
{
if(sqr1 == " X " && sqr2 == " X " && sqr3 == " X ")
{
function player1Check() {
if (sqr1 == " X " && sqr2 == " X " && sqr3 == " X ") {
alert("Woot! Player 1 has won!")
reset()
}
else if(sqr4 == " X " && sqr5 == " X " && sqr6 == " X ")
{
} else if (sqr4 == " X " && sqr5 == " X " && sqr6 == " X ") {
alert("Woot! Player 1 has won!")
reset()
}
else if(sqr7 == " X " && sqr8 == " X " && sqr9 == " X ")
{
} else if (sqr7 == " X " && sqr8 == " X " && sqr9 == " X ") {
alert("Woot! Player 1 has won!")
reset()
}
else if(sqr1 == " X " && sqr5 == " X " && sqr9 == " X ")
{
} else if (sqr1 == " X " && sqr5 == " X " && sqr9 == " X ") {
alert("Woot! Player 1 has won!")
reset()
}
else if(sqr1 == " X " && sqr4 == " X " && sqr7 == " X ")
{
} else if (sqr1 == " X " && sqr4 == " X " && sqr7 == " X ") {
alert("Woot! Player 1 has won!")
reset()
}
else if(sqr2 == " X " && sqr5 == " X " && sqr8 == " X ")
{
} else if (sqr2 == " X " && sqr5 == " X " && sqr8 == " X ") {
alert("Woot! Player 1 has won!")
reset()
}
else if(sqr3 == " X " && sqr6 == " X " && sqr9 == " X ")
{
} else if (sqr3 == " X " && sqr6 == " X " && sqr9 == " X ") {
alert("Woot! Player 1 has won!")
reset()
}
else if(sqr1 == " X " && sqr5 == " X " && sqr9 == " X ")
{
} else if (sqr1 == " X " && sqr5 == " X " && sqr9 == " X ") {
alert("Woot! Player 1 has won!")
reset()
}
else if(sqr3 == " X " && sqr5 == " X " && sqr7 == " X ")
{
} else if (sqr3 == " X " && sqr5 == " X " && sqr7 == " X ") {
alert("Woot! Player 1 has won!")
reset()
}
else
{
} else {
player2Check()
drawCheck()
}
}
function player2Check()
{
function player2Check() {
vari()
drawCheck()
if(sqr1 == " O " && sqr2 == " O " && sqr3 == " O ")
{
if (sqr1 == " O " && sqr2 == " O " && sqr3 == " O ") {
alert("Blast. Player 2 has won.")
reset()
}
else if(sqr4 == " O " && sqr5 == " O " && sqr6 == " O ")
{
} else if (sqr4 == " O " && sqr5 == " O " && sqr6 == " O ") {
alert("Blast. Player 2 has won.")
reset()
}
else if(sqr7 == " O " && sqr8 == " O " && sqr9 == " O ")
{
} else if (sqr7 == " O " && sqr8 == " O " && sqr9 == " O ") {
alert("Blast. Player 2 has won.")
reset()
}
else if(sqr1 == " O " && sqr5 == " O " && sqr9 == " O ")
{
} else if (sqr1 == " O " && sqr5 == " O " && sqr9 == " O ") {
alert("Blast. Player 2 has won.")
reset()
}
else if(sqr1 == " O " && sqr4 == " O " && sqr7 == " O ")
{
} else if (sqr1 == " O " && sqr4 == " O " && sqr7 == " O ") {
alert("Blast. Player 2 has won.")
reset()
}
else if(sqr2 == " O " && sqr5 == " O " && sqr8 == " O ")
{
} else if (sqr2 == " O " && sqr5 == " O " && sqr8 == " O ") {
alert("Blast. Player 2 has won.")
reset()
}
else if(sqr3 == " O " && sqr6 == " O " && sqr9 == " O ")
{
} else if (sqr3 == " O " && sqr6 == " O " && sqr9 == " O ") {
alert("Blast. Player 2 has won.")
reset()
}
else if(sqr1 == " O " && sqr5 == " O " && sqr9 == " O ")
{
} else if (sqr1 == " O " && sqr5 == " O " && sqr9 == " O ") {
alert("Blast. Player 2 has won.")
reset()
}
else if(sqr3 == " O " && sqr5 == " O " && sqr7 == " O ")
{
} else if (sqr3 == " O " && sqr5 == " O " && sqr7 == " O ") {
alert("Blast. Player 2 has won.")
reset()
}
}
function drawCheck()
{
function drawCheck() {
vari()
moveCount = sqr1T + sqr2T + sqr3T + sqr4T + sqr5T + sqr6T + sqr7T + sqr8T + sqr9T
if(moveCount == 9)
{
if (moveCount == 9) {
reset()
alert("You tied with the computer. Try harder next time!")
}
}
function winCheck()
{
function winCheck() {
check2()
if(sqr1 == " O " && sqr2 == " O " && sqr3T == 0 && turn == 1)
{
if (sqr1 == " O " && sqr2 == " O " && sqr3T == 0 && turn == 1) {
document.tic.sqr3.value = " O "
sqr3T = 1;
turn = 0;
}
else if(sqr2 == " O " && sqr3 == " O " && sqr1T == 0 && turn == 1)
{
} else if (sqr2 == " O " && sqr3 == " O " && sqr1T == 0 && turn == 1) {
document.tic.sqr1.value = " O "
sqr1T = 1;
turn = 0;
}
else if(sqr4 == " O " && sqr5 == " O " && sqr6T == 0 && turn == 1)
{
} else if (sqr4 == " O " && sqr5 == " O " && sqr6T == 0 && turn == 1) {
document.tic.sqr6.value = " O "
sqr6T = 1;
turn = 0;
}
else if(sqr5 == " O " && sqr6 == " O " && sqr4T == 0 && turn == 1)
{
} else if (sqr5 == " O " && sqr6 == " O " && sqr4T == 0 && turn == 1) {
document.tic.sqr4.value = " O "
sqr4T = 1;
turn = 0;
}
else if(sqr7 == " O " && sqr8 == " O " && sqr9T == 0 && turn == 1)
{
} else if (sqr7 == " O " && sqr8 == " O " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
}
else if(sqr8 == " O " && sqr9 == " O " && sqr7T == 0 && turn == 1)
{
} else if (sqr8 == " O " && sqr9 == " O " && sqr7T == 0 && turn == 1) {
document.tic.sqr7.value = " O "
sqr7T = 1;
turn = 0;
}
else if(sqr1 == " O " && sqr5 == " O " && sqr9T == 0 && turn == 1)
{
} else if (sqr1 == " O " && sqr5 == " O " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
}
else if(sqr5 == " O " && sqr9 == " O " && sqr1T == 0 && turn == 1)
{
} else if (sqr5 == " O " && sqr9 == " O " && sqr1T == 0 && turn == 1) {
document.tic.sqr1.value = " O "
sqr1T = 1;
turn = 0;
}
else if(sqr3 == " O " && sqr5 == " O " && sqr7T == 0 && turn == 1)
{
} else if (sqr3 == " O " && sqr5 == " O " && sqr7T == 0 && turn == 1) {
document.tic.sqr7.value = " O "
sqr7T = 1;
turn = 0;
}
else if(sqr7 == " O " && sqr5 == " O " && sqr3T == 0 && turn == 1)
{
} else if (sqr7 == " O " && sqr5 == " O " && sqr3T == 0 && turn == 1) {
document.tic.sqr3.value = " O "
sqr3T = 1;
turn = 0;
}
else if(sqr1 == " O " && sqr3 == " O " && sqr2T == 0 && turn == 1)
{
} else if (sqr1 == " O " && sqr3 == " O " && sqr2T == 0 && turn == 1) {
document.tic.sqr2.value = " O "
sqr2T = 1;
turn = 0;
}
else if(sqr4 == " O " && sqr6 == " O " && sqr5T == 0 && turn == 1)
{
} else if (sqr4 == " O " && sqr6 == " O " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
}
else if(sqr7 == " O " && sqr9 == " O " && sqr8T == 0 && turn == 1)
{
} else if (sqr7 == " O " && sqr9 == " O " && sqr8T == 0 && turn == 1) {
document.tic.sqr8.value = " O "
sqr8T = 1;
turn = 0;
}
else if(sqr1 == " O " && sqr7 == " O " && sqr4T == 0 && turn == 1)
{
} else if (sqr1 == " O " && sqr7 == " O " && sqr4T == 0 && turn == 1) {
document.tic.sqr4.value = " O "
sqr4T = 1;
turn = 0;
}
else if(sqr2 == " O " && sqr8 == " O " && sqr5T == 0 && turn == 1)
{
} else if (sqr2 == " O " && sqr8 == " O " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
}
else if(sqr3 == " O " && sqr9 == " O " && sqr6T == 0 && turn == 1)
{
} else if (sqr3 == " O " && sqr9 == " O " && sqr6T == 0 && turn == 1) {
document.tic.sqr6.value = " O "
sqr6T = 1;
turn = 0;
}
else if(sqr1 == " O " && sqr5 == " O " && sqr9T == 0 && turn == 1)
{
} else if (sqr1 == " O " && sqr5 == " O " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
}
else if(sqr4 == " O " && sqr7 == " O " && sqr1T == 0 && turn == 1)
{
} else if (sqr4 == " O " && sqr7 == " O " && sqr1T == 0 && turn == 1) {
document.tic.sqr1.value = " O "
sqr1T = 1;
turn = 0;
}
else if(sqr5 == " O " && sqr8 == " O " && sqr2T == 0 && turn == 1)
{
} else if (sqr5 == " O " && sqr8 == " O " && sqr2T == 0 && turn == 1) {
document.tic.sqr2.value = " O "
sqr2T = 1;
turn = 0;
}
else if(sqr6 == " O " && sqr9 == " O " && sqr3T == 0 && turn == 1)
{
} else if (sqr6 == " O " && sqr9 == " O " && sqr3T == 0 && turn == 1) {
document.tic.sqr3.value = " O "
sqr3T = 1;
turn = 0;
}
else if(sqr1 == " O " && sqr4 == " O " && sqr7T == 0 && turn == 1)
{
} else if (sqr1 == " O " && sqr4 == " O " && sqr7T == 0 && turn == 1) {
document.tic.sqr7.value = " O "
sqr7T = 1;
turn = 0;
}
else if(sqr2 == " O " && sqr5 == " O " && sqr8T == 0 && turn == 1)
{
} else if (sqr2 == " O " && sqr5 == " O " && sqr8T == 0 && turn == 1) {
document.tic.sqr8.value = " O "
sqr8T = 1;
turn = 0;
}
else if(sqr3 == " O " && sqr6 == " O " && sqr9T == 0 && turn == 1)
{
} else if (sqr3 == " O " && sqr6 == " O " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
}
else if(sqr1 == " O " && sqr9 == " O " && sqr5T == 0 && turn == 1)
{
} else if (sqr1 == " O " && sqr9 == " O " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
}
else if(sqr3 == " O " && sqr7 == " O " && sqr5T == 0 && turn == 1)
{
} else if (sqr3 == " O " && sqr7 == " O " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
}
else
{
} else {
computer()
}
check2()
}
function computer()
{
function computer() {
check2()
if(sqr1 == " X " && sqr2 == " X " && sqr3T == 0 && turn == 1)
{
if (sqr1 == " X " && sqr2 == " X " && sqr3T == 0 && turn == 1) {
document.tic.sqr3.value = " O "
sqr3T = 1;
turn = 0;
}
else if(sqr2 == " X " && sqr3 == " X " && sqr1T == 0 && turn == 1)
{
} else if (sqr2 == " X " && sqr3 == " X " && sqr1T == 0 && turn == 1) {
document.tic.sqr1.value = " O "
sqr1T = 1;
turn = 0;
}
else if(sqr4 == " X " && sqr5 == " X " && sqr6T == 0 && turn == 1)
{
} else if (sqr4 == " X " && sqr5 == " X " && sqr6T == 0 && turn == 1) {
document.tic.sqr6.value = " O "
sqr6T = 1;
turn = 0;
}
else if(sqr5 == " X " && sqr6 == " X " && sqr4T == 0 && turn == 1)
{
} else if (sqr5 == " X " && sqr6 == " X " && sqr4T == 0 && turn == 1) {
document.tic.sqr4.value = " O "
sqr4T = 1;
turn = 0;
}
else if(sqr7 == " X " && sqr8 == " X " && sqr9T == 0 && turn == 1)
{
} else if (sqr7 == " X " && sqr8 == " X " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
}
else if(sqr8 == " X " && sqr9 == " X " && sqr7T == 0 && turn == 1)
{
} else if (sqr8 == " X " && sqr9 == " X " && sqr7T == 0 && turn == 1) {
document.tic.sqr7.value = " O "
sqr7T = 1;
turn = 0;
}
else if(sqr1 == " X " && sqr5 == " X " && sqr9T == 0 && turn == 1)
{
} else if (sqr1 == " X " && sqr5 == " X " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
}
else if(sqr5 == " X " && sqr9 == " X " && sqr1T == 0 && turn == 1)
{
} else if (sqr5 == " X " && sqr9 == " X " && sqr1T == 0 && turn == 1) {
document.tic.sqr1.value = " O "
sqr1T = 1;
turn = 0;
}
else if(sqr3 == " X " && sqr5 == " X " && sqr7T == 0 && turn == 1)
{
} else if (sqr3 == " X " && sqr5 == " X " && sqr7T == 0 && turn == 1) {
document.tic.sqr7.value = " O "
sqr7T = 1;
turn = 0;
}
else if(sqr7 == " X " && sqr5 == " X " && sqr3T == 0 && turn == 1)
{
} else if (sqr7 == " X " && sqr5 == " X " && sqr3T == 0 && turn == 1) {
document.tic.sqr3.value = " O "
sqr3T = 1;
turn = 0;
}
else if(sqr1 == " X " && sqr3 == " X " && sqr2T == 0 && turn == 1)
{
} else if (sqr1 == " X " && sqr3 == " X " && sqr2T == 0 && turn == 1) {
document.tic.sqr2.value = " O "
sqr2T = 1;
turn = 0;
}
else if(sqr4 == " X " && sqr6 == " X " && sqr5T == 0 && turn == 1)
{
} else if (sqr4 == " X " && sqr6 == " X " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
}
else if(sqr7 == " X " && sqr9 == " X " && sqr8T == 0 && turn == 1)
{
} else if (sqr7 == " X " && sqr9 == " X " && sqr8T == 0 && turn == 1) {
document.tic.sqr8.value = " O "
sqr8T = 1;
turn = 0;
}
else if(sqr1 == " X " && sqr7 == " X " && sqr4T == 0 && turn == 1)
{
} else if (sqr1 == " X " && sqr7 == " X " && sqr4T == 0 && turn == 1) {
document.tic.sqr4.value = " O "
sqr4T = 1;
turn = 0;
}
else if(sqr2 == " X " && sqr8 == " X " && sqr5T == 0 && turn == 1)
{
} else if (sqr2 == " X " && sqr8 == " X " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
}
else if(sqr3 == " X " && sqr9 == " X " && sqr6T == 0 && turn == 1)
{
} else if (sqr3 == " X " && sqr9 == " X " && sqr6T == 0 && turn == 1) {
document.tic.sqr6.value = " O "
sqr6T = 1;
turn = 0;
}
else if(sqr1 == " X " && sqr5 == " X " && sqr9T == 0 && turn == 1)
{
} else if (sqr1 == " X " && sqr5 == " X " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
}
else if(sqr4 == " X " && sqr7 == " X " && sqr1T == 0 && turn == 1)
{
} else if (sqr4 == " X " && sqr7 == " X " && sqr1T == 0 && turn == 1) {
document.tic.sqr1.value = " O "
sqr1T = 1;
turn = 0;
}
else if(sqr5 == " X " && sqr8 == " X " && sqr2T == 0 && turn == 1)
{
} else if (sqr5 == " X " && sqr8 == " X " && sqr2T == 0 && turn == 1) {
document.tic.sqr2.value = " O "
sqr2T = 1;
turn = 0;
}
else if(sqr6 == " X " && sqr9 == " X " && sqr3T == 0 && turn == 1)
{
} else if (sqr6 == " X " && sqr9 == " X " && sqr3T == 0 && turn == 1) {
document.tic.sqr3.value = " O "
sqr3T = 1;
turn = 0;
}
else if(sqr1 == " X " && sqr4 == " X " && sqr7T == 0 && turn == 1)
{
} else if (sqr1 == " X " && sqr4 == " X " && sqr7T == 0 && turn == 1) {
document.tic.sqr7.value = " O "
sqr7T = 1;
turn = 0;
}
else if(sqr2 == " X " && sqr5 == " X " && sqr8T == 0 && turn == 1)
{
} else if (sqr2 == " X " && sqr5 == " X " && sqr8T == 0 && turn == 1) {
document.tic.sqr8.value = " O "
sqr8T = 1;
turn = 0;
}
else if(sqr3 == " X " && sqr6 == " X " && sqr9T == 0 && turn == 1)
{
} else if (sqr3 == " X " && sqr6 == " X " && sqr9T == 0 && turn == 1) {
document.tic.sqr9.value = " O "
sqr9T = 1;
turn = 0;
}
else if(sqr1 == " X " && sqr9 == " X " && sqr5T == 0 && turn == 1)
{
} else if (sqr1 == " X " && sqr9 == " X " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
}
else if(sqr3 == " X " && sqr7 == " X " && sqr5T == 0 && turn == 1)
{
} else if (sqr3 == " X " && sqr7 == " X " && sqr5T == 0 && turn == 1) {
document.tic.sqr5.value = " O "
sqr5T = 1;
turn = 0;
}
else
{
} else {
AI()
}
check2()
}
function AI()
{
function AI() {
vari()
if(document.tic.sqr5.value == " " && turn == 1)
{
if (document.tic.sqr5.value == " " && turn == 1) {
document.tic.sqr5.value = " O "
turn = 0
sqr5T = 1
}
else if(document.tic.sqr1.value == " " && turn == 1)
{
} else if (document.tic.sqr1.value == " " && turn == 1) {
document.tic.sqr1.value = " O "
turn = 0
sqr1T = 1
}
else if(document.tic.sqr9.value == " " && turn == 1)
{
} else if (document.tic.sqr9.value == " " && turn == 1) {
document.tic.sqr9.value = " O "
turn = 0
sqr9T = 1
}
else if(document.tic.sqr6.value == " " && turn == 1)
{
} else if (document.tic.sqr6.value == " " && turn == 1) {
document.tic.sqr6.value = " O "
turn = 0
sqr6T = 1
}
else if(document.tic.sqr2.value == " " && turn == 1)
{
} else if (document.tic.sqr2.value == " " && turn == 1) {
document.tic.sqr2.value = " O "
turn = 0
sqr2T = 1
}
else if(document.tic.sqr8.value == " " && turn == 1)
{
} else if (document.tic.sqr8.value == " " && turn == 1) {
document.tic.sqr8.value = " O "
turn = 0
sqr8T = 1
}
else if(document.tic.sqr3.value == " " && turn == 1)
{
} else if (document.tic.sqr3.value == " " && turn == 1) {
document.tic.sqr3.value = " O "
turn = 0
sqr3T = 1
}
else if(document.tic.sqr7.value == " " && turn == 1)
{
} else if (document.tic.sqr7.value == " " && turn == 1) {
document.tic.sqr7.value = " O "
turn = 0
sqr7T = 1
}
else if(document.tic.sqr4.value == " " && turn == 1)
{
} else if (document.tic.sqr4.value == " " && turn == 1) {
document.tic.sqr4.value = " O "
turn = 0
sqr4T = 1
@ -659,8 +441,7 @@
check2()
}
function reset()
{
function reset() {
document.tic.sqr1.value = " "
document.tic.sqr2.value = " "
document.tic.sqr3.value = " "
@ -684,100 +465,31 @@
moveCount = 0
}
function resetter()
{
function resetter() {
reset()
}
</SCRIPT>
</head>
</script>
<body id="index" class="home">
<section id="cover">
<div class="cover" style="background-image: url('/assets/images/Covers/BlueCheckers.png');"> </div>
</section>
<header>
<img class="Logo" src="Resources/Images/Logos/NewLogo.png" alt="Mad Splash" title="Mad Splash!" />
<nav>
<ul>
<li><a class="navLink" href="index.php">Home</a></li>
<li><a class="navLink" href="blog/blog.php">Blog</a></li>
<li><a class="navLink" href="http://forums.madsplash.net/index.php">Forums</a></li>
<li class="dropdown">
<a class="dropLink" href="index.php?page=projects">Projects</a>
<div class="drop">
<section>
<h2>Books</h2>
<a href="#">Battles for Arthos</a>
<a href="#">The Organization</a>
</section>
<section>
<h2>Games</h2>
<a href="#">The RPG</a>
<a href="#">BattleMonsters</a>
</section>
<div class="clear"> </div>
</div>
</li>
</ul>
</nav>
</header>
<section id="cover">
<div class="cover" style="background-image: url('Resources/Images/Covers/BlueCheckers.png');"> </div>
</section>
<section id="body">
<section id="body">
<div style="width: 100%; margin-bottom: 4px; height: 1px;">&nbsp;</div>
<h1>Set's Tic-Tac-Toe</h1>
<FORM NAME="tic" style="width: 50%; display: block; margin: 0px auto; padding: 12px 0px;">
<form name="tic" style="width: 50%; display: block; margin: 0px auto; padding: 12px 0px;">
<center>
<INPUT TYPE="button" NAME="sqr1" class="tictac" value=" " onClick="if(document.tic.sqr1.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr1.value = ' X '; sqr1T = 1; turn = 1; vari(); check();} else if(document.tic.sqr1.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr1.value = ' X '; sqr1T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr1.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr1.value = ' O '; sqr1T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<INPUT TYPE="button" NAME="sqr2" class="tictac" value=" " onClick="if(document.tic.sqr2.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr2.value = ' X '; sqr2T = 1; turn = 1; vari(); check();} else if(document.tic.sqr2.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr2.value = ' X '; sqr2T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr2.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr2.value = ' O '; sqr2T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<INPUT TYPE="button" NAME="sqr3" class="tictac" value=" " onClick="if(document.tic.sqr3.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr3.value = ' X '; sqr3T = 1; turn = 1; vari(); check();} else if(document.tic.sqr3.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr3.value = ' X '; sqr3T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr3.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr3.value = ' O '; sqr3T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT><br />
<INPUT TYPE="button" NAME="sqr4" class="tictac" value=" " onClick="if(document.tic.sqr4.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr4.value = ' X '; sqr4T = 1; turn = 1; vari(); check();} else if(document.tic.sqr4.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr4.value = ' X '; sqr4T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr4.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr4.value = ' O '; sqr4T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<INPUT TYPE="button" NAME="sqr5" class="tictac" value=" " onClick="if(document.tic.sqr5.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr5.value = ' X '; sqr5T = 1; turn = 1; vari(); check();} else if(document.tic.sqr5.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr5.value = ' X '; sqr5T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr5.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr5.value = ' O '; sqr5T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<INPUT TYPE="button" NAME="sqr6" class="tictac" value=" " onClick="if(document.tic.sqr6.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr6.value = ' X '; sqr6T = 1; turn = 1; vari(); check();} else if(document.tic.sqr6.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr6.value = ' X '; sqr6T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr6.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr6.value = ' O '; sqr6T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT><br />
<INPUT TYPE="button" NAME="sqr7" class="tictac" value=" " onClick="if(document.tic.sqr7.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr7.value = ' X '; sqr7T = 1; turn = 1; vari(); check();} else if(document.tic.sqr7.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr7.value = ' X '; sqr7T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr7.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr7.value = ' O '; sqr7T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<INPUT TYPE="button" NAME="sqr8" class="tictac" value=" " onClick="if(document.tic.sqr8.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr8.value = ' X '; sqr8T = 1; turn = 1; vari(); check();} else if(document.tic.sqr8.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr8.value = ' X '; sqr8T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr8.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr8.value = ' O '; sqr8T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<INPUT TYPE="button" NAME="sqr9" class="tictac" value=" " onClick="if(document.tic.sqr9.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr9.value = ' X '; sqr9T = 1; turn = 1; vari(); check();} else if(document.tic.sqr9.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr9.value = ' X '; sqr9T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr9.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr9.value = ' O '; sqr9T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<input type="button" name="sqr1" class="tictac" value=" " onClick="if(document.tic.sqr1.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr1.value = ' X '; sqr1T = 1; turn = 1; vari(); check();} else if(document.tic.sqr1.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr1.value = ' X '; sqr1T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr1.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr1.value = ' O '; sqr1T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<input type="button" name="sqr2" class="tictac" value=" " onClick="if(document.tic.sqr2.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr2.value = ' X '; sqr2T = 1; turn = 1; vari(); check();} else if(document.tic.sqr2.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr2.value = ' X '; sqr2T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr2.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr2.value = ' O '; sqr2T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<input type="button" name="sqr3" class="tictac" value=" " onClick="if(document.tic.sqr3.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr3.value = ' X '; sqr3T = 1; turn = 1; vari(); check();} else if(document.tic.sqr3.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr3.value = ' X '; sqr3T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr3.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr3.value = ' O '; sqr3T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT><br />
<input type="button" name="sqr4" class="tictac" value=" " onClick="if(document.tic.sqr4.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr4.value = ' X '; sqr4T = 1; turn = 1; vari(); check();} else if(document.tic.sqr4.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr4.value = ' X '; sqr4T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr4.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr4.value = ' O '; sqr4T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<input type="button" name="sqr5" class="tictac" value=" " onClick="if(document.tic.sqr5.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr5.value = ' X '; sqr5T = 1; turn = 1; vari(); check();} else if(document.tic.sqr5.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr5.value = ' X '; sqr5T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr5.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr5.value = ' O '; sqr5T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<input type="button" name="sqr6" class="tictac" value=" " onClick="if(document.tic.sqr6.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr6.value = ' X '; sqr6T = 1; turn = 1; vari(); check();} else if(document.tic.sqr6.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr6.value = ' X '; sqr6T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr6.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr6.value = ' O '; sqr6T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT><br />
<input type="button" name="sqr7" class="tictac" value=" " onClick="if(document.tic.sqr7.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr7.value = ' X '; sqr7T = 1; turn = 1; vari(); check();} else if(document.tic.sqr7.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr7.value = ' X '; sqr7T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr7.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr7.value = ' O '; sqr7T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<input type="button" name="sqr8" class="tictac" value=" " onClick="if(document.tic.sqr8.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr8.value = ' X '; sqr8T = 1; turn = 1; vari(); check();} else if(document.tic.sqr8.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr8.value = ' X '; sqr8T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr8.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr8.value = ' O '; sqr8T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
<input type="button" name="sqr9" class="tictac" value=" " onClick="if(document.tic.sqr9.value == ' ' && turn == 0 && mode == 1) {document.tic.sqr9.value = ' X '; sqr9T = 1; turn = 1; vari(); check();} else if(document.tic.sqr9.value == ' ' && turn == 1 && mode == 2) {document.tic.sqr9.value = ' X '; sqr9T = 1; turn = 0; vari(); player1Check()} else if(document.tic.sqr9.value == ' ' && turn == 0 && mode == 2) {document.tic.sqr9.value = ' O '; sqr9T = 1; turn = 1; vari(); player1Check()} drawCheck()"></INPUT>
</center>
</form>
</section>
<footer>
<div class="box">
<div style="padding-top: 8px;">
<section class="splash">
<img src="Resources/Images/Logos/MadSplash2Dark.png" style="width: 90%; display: block; margin: 0px auto; margin-bottom: -12px;" />
<a href="index.php?page=privacy">Privacy</a> | <a href="index.php?page=tandc">The T&amp;C</a> <br />
<p style="width: 200px; margin: 0px auto;">
Copyright &copy; 2014, Mad Splash. <br />
All trademarked stuff is the property of it's respective owner(s).
</p>
</section>
<section>
<h2>OTHER STUFFS</h2>
<ul>
<li><a href="#">Our staff</a></li>
<li><a href="#">Jobs here</a></li>
</ul>
</section>
<section>
<h2>PROJECTS</h2>
<ul>
<li><a href="index.php?page=projects&project=tbfa">Battles for Arthos</a></li>
<li><a href="index.php?page=projects&project=therpg">The RPG</a></li>
</ul>
</section>
</div>
</div>
</footer>
</body>
</html>
</form>
</section>