-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.php
More file actions
43 lines (42 loc) · 1.51 KB
/
game.php
File metadata and controls
43 lines (42 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<head>
<title>Scrabble</title>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" title="no title" charset="utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script src="./socket.io.js"></script>
<script src="./game_script.js"></script>
</head>
<body>
<div id="body-wrapper">
<h1>Scrabble</h1>
<div id="game">
<table id="board">
<?php
$counter = 0;
for ($y=1; $y<=8; $y++) {
print '<tr class="board-row" id="board-row-'. $y .'">';
for ($x=1; $x<=8; $x++) {
$counter++;
print '<td class="board-cell droppable" id="board-cell-'. $x .'-'. $y .'-'. $counter .'"></td>';
}
print '</tr>';
}
?>
</table>
<table id="private">
<tr>
<?php
for ($n=1; $n<=8; $n++) {
print '<td class="private-cell" id="private-cell-'. $n .'">';
print '<div id="letter-'. $n .'" class="letter letter-mine draggable" draggable="true">'. chr(rand(65, 90)) . '</div>';
print '</td>';
}
?>
</tr>
</table>
<input type="button" name="message" value="play" id="submit">
</div>
</div>
</body>