Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ankit/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/ticTac1/.vs

/ticTac1/packages

/ticTac1/ticTac1/bin

/ticTac1/ticTac1/obj
65 changes: 65 additions & 0 deletions ankit/Login.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<html>
<style>
body{

}


input[type=text], input[type=password] ,input[type=email]{
width: 30%;
padding: 15px;
margin: 5px 0 22px 0;
display: inline-block;
border: none;
background: #f1f1f1;
margin-top:0px;
text-align:left;
}




/* Set a style for all buttons */
button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 40%;
opacity: 0.9;
}

button:hover {
opacity:1;
}

/* Extra styles for the cancel button */
.cancel {
float:auto;
padding: 10px 10px;
background-color: #f44336;
}

/* Float cancel and signup buttons and add an equal width */
.cancel, .signupbtn {
width: 30%;
padding:16px;
}

/* Add padding to container elements */
.container {
padding: 16px;

}
body {
font-family: Arial, Helvetica, sans-serif;
}

/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 200px) {
.cancel, .signupbtn {
width: 50%;
}
}
21 changes: 21 additions & 0 deletions ankit/Tac1.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
td{
width:100px;
height: 100px;
background: blue;
font-size: 40px;
text-align: center;
border-radius: 10px ;
}
table{
margin: 20px auto;
border-radius: 10px;
color: white;
}
tr td:hover {
background: green;
cursor: pointer;
}
body{
background:orange;
background-image: url("game.png");
}
33 changes: 33 additions & 0 deletions ankit/Tac1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<head>

<title>TIC TAC TOE</title>
<link rel="stylesheet" href="Tac1.css">
</head>
<body>

<h1><center>TIC TAC TOE</center></h1>
<h1 id="player"><center>lets play</center></h1>

<table >

<tr>
<td id="r1" onclick="printx('1')"></td>
<td id="r2" onclick="printx('2')"></td>
<td id="r3" onclick="printx('3')"></td>
</tr>
<tr >
<td id="r4" onclick="printx('4')"></td>
<td id="r5" onclick="printx('5')"></td>
<td id="r6" onclick="printx('6')"></td>
</tr>
<tr>
<td id="r7" onclick="printx('7')"></td>
<td id="r8" onclick="printx('8')"></td>
<td id="r9" onclick="printx('9')"></td>
</tr>

</table>

<script src="Tac1.js"></script>
</body>
65 changes: 65 additions & 0 deletions ankit/Tac1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
var sign = "X";
var sign ="o";
var disp = document.getElementById("player");
var play;
var count=0;
var Email;
var Pass;


function printx(number){
var play = document.getElementById("r"+number);
console.log(play);

if(play.innerText==""){
play.innerText=sign;
winner();
match();
disp.innerHTML="<center>"+ sign + " Turn "+"</center>";

}


}
function match(){
if(sign=="x")sign ="o";
else sign = "x";

}
function notmatch(no){
return document.getElementById("r"+no).innerHTML;
}
function checkmove(a,b,c,m){
if(notmatch(a)==m && notmatch(b)==m && notmatch(c)==m)
return true;
else return false;
}

function winner(){
if(checkmove(1,2,3,sign)||checkmove(4,5,6,sign)||checkmove(7,8,9,sign)
||checkmove(1,4,7,sign)||checkmove(2,5,8,sign)||checkmove(3,6,9,sign)
||checkmove(1,5,9,sign)||checkmove(7,5,3,sign)){
disp.innerHTML = "<center>" +sign + " Won " + "</center>";
for(var i=1;i<=9;i++){
document.getElementById("r"+i).innerHTML="";
}
if(sign=="X"){
count=count+10;
}
else
count=count-5;
alert("score updated")
console.log(count);
throw "game end";
}else{
if(notmatch(1)!=""&& notmatch(2)!=""&& notmatch(3)!=""&&
notmatch(4)!=""&& notmatch(5)!=""&& notmatch(6)!=""&&
notmatch(7)!=""&& notmatch(8)!=""&& notmatch(9)!=""){

disp.innerHTML = "<center> its a tie </center>";

alert("score updated")
throw "its a tie";
}
}
}
89 changes: 89 additions & 0 deletions ankit/ankitdetail page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<html>
<head>
<title>sign up Page</title>
<style>
body{
background-image: url("game.png");
}
</style>

<link rel="stylesheet" type="text/css" href="ankitdetail.css">

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">


src="https://code.jquery.com/jquery-3.3.1.js"
integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous">

</script>

<script>
function call(){
debugger;

var user=document.getElementById("user").value;
var pass=document.getElementById("pass").value;
// var repass=document.getElementById("repass").value;

var signupData={

"Email":user,
"Pass":pass,
/* "Re-password":repass,*/

}

$.ajax({

url:"http://localhost:54411//api/Ticgames",
data:signupData,
type:'post',
dataType:'json',
success:function(res){
console.log(res);
window.location="index.html"
alert("Player details has been created");
}
});
}
</script>
</head>
<body>


<form>
<div class="header">
<div class="navbar">
<a href="index.html">Sign in</a>

</div>
</div>
<div class ="container">

<center>
<b>
<h1><b>Sign up</b></h1>
<h2><p>Please fill this form to create an account.</p></h2>
<br>
Name :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" placeholder="Enter your Name" Id="name"><br>
User_Name :<input type="email" placeholder="EnteryourEmail" Id="user"><br>
Password :&nbsp;&nbsp;<input type="Password" placeholder="Enter your Password" Id="pass"><br>
Re-Password : <input type="Password" Id="repass" placeholder="Enter Re-Enter Your Password"><br>

<input type="checkbox" checked="checked" name="remember" style="margin-left:-20px;" id=""> Remember me<br>
<p>By creating an account you agree to our <a href="#">Terms & Privacy</a>.</p>
<div class="clearfix">
<button type="button" class="Cancel">Reset</button><br>
<input type="button" value="Signup" name="submit" class="signupbtn" onclick="call()">
</div>

</b>

</center>
</div>

</form>

</body>
</html>
100 changes: 100 additions & 0 deletions ankit/ankitdetail.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<html>
<style>
body{

}
* {box-sizing: border-box}


input[type=text], input[type=password] ,input[type=email]{
width: 30%;
padding: 15px;
margin: 5px 0 22px 0;
display: inline-block;
border: none;
background: #f1f1f1;
margin-top:0px;
text-align:left;
}



hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}

/* Set a style for all buttons */
button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}

button:hover {
opacity:1;
}

/* Extra styles for the cancel button */
.cancel {
float:auto;
padding: 10px 10px;
background-color: #f44336;
cursor:pointer;
}

.signupbtn {
float:auto;
padding: 10px 10px;
background-color: #4CAF50;
cursor:pointer;
}

/* Float cancel and signup buttons and add an equal width */
.cancel, .signupbtn {
width: 20%;
padding:16px;
}

/* Add padding to container elements */
.container {
padding: 16px;

}
body {
font-family: Arial, Helvetica, sans-serif;
}

.navbar {
overflow: hidden;
background-color: #333;
}

.navbar a {
float: right;
font-size: 16px;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;

}



.navbar a:hover, .dropdown:hover .dropbtn {
background-color: red;
}


/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 200px) {
.cancel, .signupbtn {
width: 50%;
}
}
Binary file added ankit/game.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading