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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Project Title

A 2048 game.
230 changes: 81 additions & 149 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,150 +1,82 @@
<html>

<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script type="text/javascript" src="static/script.js"></script>

</head>

<body background="static/background.png">

<div style="text-align: -webkit-center; ">
<p style="font-size: 50px;color: grey ; padding: 10px ; ; margin-bottom: 15px">

2048


</p>
<div style=" display: inline-flex;
align-items: center;
margin-right: 100px">
<div id="back">
<p id="score" style=" font-size: 33px;
text-align: center;
color: white;
font-family: sans-serif;
">
Score Board

</p>

</div>
<div id="back2" >
<p id="reload" style=" font-size: 20px;
text-align: center;
color: white;
cursor: pointer;
font-family: sans-serif;
">
New Game
</p>

</div>



</div>
</div>
<div style=" display: flex;
align-items: center;
/* margin-left: 307px; */
justify-content: center;">
<div style=" padding: 18px;">
<table id="table" cellspacing="0">
<tr>
<td style="border-top-left-radius: 20px"> </td>
<td > </td>
<td> </td>
<td style="border-top-right-radius: 20px"> </td>

</tr>

<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>

<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>



<tr>
<td style="border-bottom-left-radius: 20px"> </td>
<td> </td>
<td> </td>
<td style="border-bottom-right-radius: 20px"> </td>
</tr>





</table>

</div>

<div style=" padding: 30px;">
<table id="keys" >
<tr>
<td> </td>
<td id="up" class="k"><img style="width: 40px;
height: 40px;" src="static/uparrow.png"> </td>
<td></td>


</tr>
<tr>
<td id="left" class="k"><img style="width: 40px;
height: 40px;" src="static/leftarrow.png"></td>
<td></td>
<td id="right" class="k"><img style="width: 40px;
height: 40px;" src="static/rightarrow.png"></td>


</tr>
<tr>
<td></td>
<td id="down" class="k"><img style="width: 40px;
height: 40px;" src="static/downarrow.png"></td>
<td></td>


</tr>






</table>

</div>

</div>
<div style="display: flex ; justify-content: center;">
<p style="font-size: 25px;

text-align: end;
color: gray;
font-family: sans-serif;
padding: 10px;"> Made By : Tushar Gupta<br>Get Code at : <a href="https://www.github.com/TUSHARZ/2048"> Github </a>
</p>




</body>






</html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script type="text/javascript" src="static/script.js"></script>
</head>
<body background="static/background.png">
<div style="text-align: -webkit-center; ">
<p style="font-size: 50px;color: grey ; padding: 10px ; ; margin-bottom: 15px">2048</p>
<div style="display: inline-flex; align-items: center; margin-right: 100px">
<div id="back">
<p id="score" style="font-size: 33px; text-align: center; color: white; font-family: sans-serif;">
Score Board
</p>
</div>
<div id="back2" >
<p id="reload" style="font-size: 20px; text-align: center; color: white; cursor: pointer; font-family: sans-serif;">
New Game
</p>
</div>
</div>
</div>
<div style="display: flex; align-items: center; /* margin-left: 307px; */ justify-content: center;">
<div style="padding: 18px;">
<table id="table" cellspacing="0">
<tr>
<td style="border-top-left-radius: 20px"> </td>
<td > </td>
<td> </td>
<td style="border-top-right-radius: 20px"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td style="border-bottom-left-radius: 20px"> </td>
<td> </td>
<td> </td>
<td style="border-bottom-right-radius: 20px"> </td>
</tr>
</table>
</div>
<div style=" padding: 30px;">
<table id="keys" >
<tr>
<td> </td>
<td id="up" class="k"><img style="width: 40px;
height: 40px;" src="static/uparrow.png"> </td>
<td></td>
</tr>
<tr>
<td id="left" class="k"><img style="width: 40px;
height: 40px;" src="static/leftarrow.png"></td>
<td></td>
<td id="right" class="k"><img style="width: 40px;
height: 40px;" src="static/rightarrow.png"></td>
</tr>
<tr>
<td></td>
<td id="down" class="k"><img style="width: 40px;
height: 40px;" src="static/downarrow.png"></td>
<td></td>
</tr>
</table>
</div>
</div>
<div style="display: flex ; justify-content: center;">
<p style="font-size: 25px;
text-align: end;
color: gray;
font-family: sans-serif;
padding: 10px;"> Made By : Tushar Gupta<br>Get Code at : <a href="https://www.github.com/TUSHARZ/2048"> Github </a></p>
</body>
</html>
68 changes: 28 additions & 40 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,60 +1,48 @@
#table td{
height: 130px;
width: 130px;
font-size:40px;
#table td {
height: 130px;
width: 130px;
font-size: 40px;
text-align: center;
padding: 10px;
border: 8px solid grey;


padding: 10px;
border: 8px solid grey;
}

#table tr {
margin: 0px;
padding: 10px;
font-size:40px;
margin: 0px;
padding: 10px;
font-size: 40px;
text-align: center;
border: 8px solid grey;

border: 8px solid grey;
}

#table {

border-radius: 20px;
font: 20px;
background: #CDC1B4;
border-radius: 20px;
font: 20px;
background: #CDC1B4;
}
#first{
border-top-left-radius: 10px;
#first {
border-top-left-radius: 10px;
}

#back{
width: 200px;
#back {
width: 200px;
height: 100px;
margin: 10;
text-align: center;
border-radius: 10px;
border: 5px solid grey;
background: #BBADA0
border: 5px solid grey;
background: #BBADA0
}
#back2{
width: 150px;
#back2 {
width: 150px;
height: 70px;
margin: 10;
text-align: center;
border-radius: 10px;
border: 5px solid grey;
background: #BBADA0
border: 5px solid grey;
background: #BBADA0
}

#keys .k{
height: 50px;

font-size:30px;
#keys .k {
height: 50px;
font-size: 30px;
text-align: center;
padding: 10px;
border: 8px solid grey;


padding: 10px;
border: 8px solid grey;
}