Skip to content

Commit

Permalink
instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri7Sh committed Feb 21, 2018
1 parent 299120a commit 7abd68f
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 70 deletions.
18 changes: 10 additions & 8 deletions main/static/assets/css/logggin.css
Original file line number Diff line number Diff line change
Expand Up @@ -452,12 +452,14 @@ Animation Keyframes

.msg{
color: #fff;
line-height: 30px;
font-size: 22px;
background: #000;
width: 300px;
margin: 30px auto;
border: 5px solid #4ca5a2;
border-radius: 6px;
padding: 10px;
line-height: 30px;
font-size: 22px;
background: #000;
width: 500px;
margin: 30px auto;
border: 5px solid #4ca5a2;
border-radius: 6px;
padding: 10px;
top: -20px;
position: relative;
}
20 changes: 11 additions & 9 deletions main/static/assets/css/loggin.css
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,15 @@ Animation Keyframes
}

.msg{
color: #fff;
line-height: 30px;
font-size: 22px;
background: #000;
width: 300px;
margin: 30px auto;
border: 5px solid #4ca5a2;
border-radius: 6px;
padding: 10px;
color: #fff;
line-height: 30px;
font-size: 22px;
background: #000;
width: 500px;
margin: 30px auto;
border: 5px solid #4ca5a2;
border-radius: 6px;
padding: 10px;
top: -20px;
position: relative;
}
3 changes: 3 additions & 0 deletions main/static/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -371,4 +371,7 @@ li{
border-radius: 6px;
background: black;
color: #5bfb71;
right: calc(50vw - 100px);
width: 200px;

}
134 changes: 101 additions & 33 deletions main/static/assets/css/ssstyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -1466,36 +1466,7 @@ body {
#navbar a {
display: none; }

#see1{
height: 96%;
width: 58%;
position: fixed;
color: white;
top: 15%;
left: 2%;
border-radius: 12px;
bottom: 1%;
background-color: rgba(0,0,0,0.5);
z-index: 2;

font-size: 2em;

}
#see2{
height: 96%;
width: 38%;
position: fixed;
color: lime;
top: 15%;
left: 60%;
border-radius: 12px;
bottom: 1%;
background-color: rgba(0,0,0,0.5);
z-index: 2;

font-size: 2em;
}



h1 {
font-size: 22px;
Expand Down Expand Up @@ -1525,7 +1496,7 @@ body {
right: 0px; } }
@media screen and (min-width: 1300px) {
#universe {
font-size: 100%; } }
font-size: 62%; } }
@media screen and (min-width: 1600px) {
.zoom-close .scale-d #solar-system {
margin-left: -120%; } }
Expand All @@ -1535,9 +1506,106 @@ body {
.holographic-text-blue{
text-shadow: -4px -2px 5px #ff3939;
color: #68e0ef;
font-family: 'Azo Sans';
font-family: monospace, arial, verdana;
}

#navbar{
font-size: 3em;
font-size: 2em;
}


.title{
/*background: url("/static/assets/images/universe.png")*/
}

.title h1{
font-size: 34px !important;
}

#universe, #main-wrapper{
position: absolute;
top:0;
left: 0;
width: 100vw;
height: 100vh;
}

#main-wrapper{
z-index: 999;
background: rgba(0,0,0,0.8);
}

#black_box{
height: 90vh;
padding: 50px;
overflow: hidden;
}

#container{

width: 100vw;
display: flex;
flex-direction: row;
justify-content: space-around;
height: 100%;
}

#see1{
text-align: justify;

height: 100%;
width: 25vw;
/*position: fixed;*/
color: white;
top: 15%;
left: 2%;
border-radius: 12px;
bottom: 1%;
/*background-color: rgba(0,0,0,0.5);*/
z-index: 2;

font-size: 1em;
/*text-transform: uppercase;*/
overflow: auto;
}
#see2{
text-align: justify;
height: 100%;
width: 65vw;
/*position: fixed;*/
color: white;
top: 15%;
left: 60%;
border-radius: 12px;
bottom: 1%;
/*background-color: rgba(0,0,0,0.5);*/
z-index: 2;

font-size: 1em;
/*text-transform: uppercase;*/
overflow: auto;
padding: 0 30px;
}


p, li{

font-size: .9em !important;
}

h3{
font-size: 24px !important;
/*line-height: 68px !important;*/
padding: 10px 0 !important;
}

h2{
text-align: left !important;
font-size: 29px !important;
padding: 20px 0 !important;
/*line-height: 3px !important;*/
}

body{
overflow: hidden;
}
4 changes: 2 additions & 2 deletions main/templates/minesweeper.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1>CHECKMATE 18<span class="letter6">_</span></h1>
<nav>
<li class="sink">$Score: <span class="score">{{score}}</span></li>
<li class="instr button" onclick="openInst()">$Instructions</li>
<li class="button" onclick="openPuzzle()">$Puzzle</li>
<li class="button" onclick="openPuzzle()">$Portallatam</li>
<li class="button" onclick="logout()">$Logout</li>
</nav>
</div>
Expand Down Expand Up @@ -135,7 +135,7 @@ <h1>CHECKMATE 18<span class="letter6">_</span></h1>
<div class="helpPuzzle">?</div>
<nav>

<button id="submit_puzzle" class="button" data-url="check/">SUBMIT</button>
<button id="submit_puzzle" class="button" data-url="check/">TELEPORT</button>
<button id="save_puzzle" class="button" data-url="save/">CLOSE</button>
</nav>
</section>
Expand Down
61 changes: 48 additions & 13 deletions main/templates/ss.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,67 @@


<body class="opening hide-UI view-2D zoom-large data-close controls-close" onload = "typeWriter()">
<div id="main-wrapper">
<div class="title">
<h1>CHECKMATE 18<span class="letter6">_</span></h1>
<h1>INSTRUCTIONS<span class="letter6">_</span></h1>
<nav>
{% if stat %}

<li class="instr button" onclick="openRegis()">$Register</li>
<li class="button" onclick="login()">$Login</li>
{% else %}
<li class="instr button" onclick="play()">$Play</li>
<li class="instr button" onclick="play()">$Detonix</li>
<li class="button" onclick="logout()">$Logout</li>
{% endif %}
</nav>
</div>
<div id = "see1" class="holographic-text-blue"><br><br>
<br><br></div>
<div id = "see2" class="holographic-text-blue"><br><br>
<br><br>Quick Instructions

<div id="black_box">

<div id="container">
<div id = "see1" class="holographic-text-blue"><h2>Overview of storyline</h2><br><p></p></div>
<div id = "see2" class="holographic-text-blue">
<h2>Quick Instructions</h2>

<ul>
<li>Time limit is 2 hrs.</li>
<li>There are 20 questions.</li>
<li>You can't re-attempt any question.</li>
<li>Each correct answer awards you 50 points and a "Portallatam" piece.</li>
<li>Clicking on the mines awards a penalty of 10 points.</li>
<li>"Portallatam" contains 12 pieces.</li>
<li>To solve the "Portallatam", place all the pieces on their correct locations on the board.</li>
<li>"Portallatam" can be submitted only after attempting all 20 questions.</li>
<li>Solving the "Portallatam" correctly awards you 25 points.</li>
<li>You have 3 attempts to solve the "Portallatam"</li>
</ul>

<h2>General Rules</h2>

<h3>Minesweeper Rules</h3>

<p>The aim is to locate all the mines and solve all the questions that are hidden under tiles on a rectangular board. You will need to use a combination of logic and luck to find all the mines without triggering an explosion.</p>

<p>The game begins with the board covered in tiles. Click on any tile to uncover it. You will reveal:</p>
<ul>
<li>A question, which you need to solve to attaian a "Portallatam" piece.</li>
<li>A colored number, which represent the number of mines in the adjacent tiles. This will help you deduce where the mines are. </li>
<li>A blank tile, which means there are no mines under any of the adjacent tiles.</li>
<li>A mine, which will detonate.</li>

<li>Repeat the previous step until you have uncovered all the tiles which do not have mines underneath them.</li>
</ul>
<h3>"Portallatam" Rule</h3>
<ul>
<li>You need to match the "Portallatam" piece with their names using your intution.</li>
<li>Click the piece to pick up, move the mouse to drag the piece and click to drop.</li>
</ul>
<p>After finishing the game, you can log out, otherwise you will be automatically logged out after the game finishes.</p>

</div>
<div id="navbar" class="holographic-text-blue">
<h1>Instructions<br></h1>

</div>
</div>
</div>

<div id="data">
</div>
<div id="universe" class="scale-stretched">
Expand Down Expand Up @@ -150,11 +185,11 @@ <h1>Instructions<br></h1>

<script>
var i = 0;
var txt = 'Overview of storyline';
var speed = 35;
var txt = " The fate of humanity is at stake, since villainous Decepticons are bringing their war on Earth.. You are one of the good Autobots. You have managed to get into the decepticon's control center. They have detected your presence on their space ship. This has alerted their survillence system. This shuttle will blast in 2 hrs. Your mission is to save the earth using their device 'Detonix' and use their teleportation system 'Portallatam' to save yourself!! Can you solve their tricky lock without causing destruction on the earth and unlock 'Portallatam'. Time is ticking.... The lock system resembles a minesweeper game with a twist. Decepticons are intelligent bots and they have set their traps. These traps are 20 questions. The decepticons are confident that you can't solve these traps to unlock their system.Are you up for the challenge?";
var speed = 15;
function typeWriter() {
if (i < txt.length) {
document.getElementById("see1").innerHTML += txt.charAt(i);
document.getElementById("see1").querySelector("p").innerHTML += txt.charAt(i);
i++;
setTimeout(typeWriter, speed);
}
Expand Down
11 changes: 6 additions & 5 deletions main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,7 @@ def register(request):
up=User()
up.username=data['name']
up.set_password(data['password'])
try:
up.save()
except IntegrityError:
state="Duplicacy in Username"
return render(request,'register.html',{'state':state})

if re.match(r"^\d{10}$",data['phone'])==None:
state="Invalid Mobile Number"
return render(request,'register.html',{'state':state})
Expand All @@ -130,6 +126,11 @@ def register(request):
else:
up.mines=randfield.mines
up.qslist=randfield.ques
try:
up.save()
except IntegrityError:
state="Duplicacy in Username"
return render(request,'register.html',{'state':state})
up.regTime = timezone.now()
up.save()
return HttpResponseRedirect('/main/login')
Expand Down

0 comments on commit 7abd68f

Please sign in to comment.