Skip to content

Commit bc61185

Browse files
committed
If you think things can't get worse it's probably only because you
lack sufficient imagination.
1 parent 621aa83 commit bc61185

File tree

5 files changed

+26
-13
lines changed

5 files changed

+26
-13
lines changed

img/doge-boy.png

1.05 MB
Loading

index.css

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ body {
44
background-color: #000;
55
color: #fff;
66

7+
background-image: url(img/doge-boy.png);
8+
background-repeat: no-repeat;
9+
background-position: center top;
10+
background-attachment: fixed;
11+
712
/* Allow mouse dragging. */
813
-moz-user-select: none;
914
-ms-user-select: none;
@@ -24,7 +29,7 @@ body {
2429
margin: 0 auto;
2530
}
2631
#container h1 {
27-
text-align: center;
32+
text-align: right;
2833
margin: 0;
2934
}
3035
#container h2 {
@@ -50,10 +55,17 @@ body {
5055
float: left;
5156
}
5257
#reset {
53-
float: right;
5458
font-size: 12pt;
59+
60+
position: relative;
61+
top: 154px;
62+
left: -148px;
5563
}
5664
#screen {
65+
/* placing on doge-boy */
66+
position: fixed;
67+
top: 55px;
68+
5769
margin: auto;
5870

5971
/* Hide the gap for font descenders. */

index.html

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,14 @@
2929

3030
<div id="container">
3131
<h1>doge-toe</h1>
32-
<h2>tic-tac-toe made in DogeScript</h2>
32+
3333
<a style="float:left" href="https://github.com/alexdantas/doge-toe">source code</a>
3434
<a style="float:right" href="http://zachbruggeman.me/dogescript/">dogescript homepage</a>
3535

3636
<!-- Here's where the action happens! -->
3737
<canvas id="screen" width="340" height="340" ></canvas>
38-
39-
<!-- Things on the bottom -->
40-
<input id="player-one" type="text" width="2pt" readonly="true" placeholder="0">
41-
42-
<input id="player-two" type="text" readonly="true" placeholder="0">
43-
<button id="reset" onclick="resetGame()">Reset</button>
4438
</div>
39+
<button id="reset" onclick="resetGame()">Reset</button>
4540

4641
<!-- jQuery for selecting stuff, jQuery UI for the highlight effect -->
4742
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

toe.djs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ very TILE_HEIGHT is 100
105105
very TILE_SPACING is 10
106106

107107
shh Colors for everything
108-
very BOARD_COLOR_BG is '#999'
108+
very BOARD_COLOR_BG is '#000'
109109
very TILE_COLOR_EMPTY is '#777'
110110
very TILE_COLOR_X is 'red'
111111
very TILE_COLOR_O is 'blue'
@@ -161,10 +161,16 @@ such drawBoard
161161
context dose fillRect with x y TILE_WIDTH TILE_HEIGHT
162162

163163
but rly tile is TILE_X
164-
context dose drawImage with player_one_image x y
164+
context dose drawImage with player_one_image x y
165+
166+
context.fillStyle is BOARD_COLOR_BG
167+
context dose fillText with PLAYER_ONE_POINTS x+10 y+10
165168

166169
but rly tile is TILE_O
167-
context dose drawImage with player_two_image x y
170+
context dose drawImage with player_two_image x y
171+
172+
context.fillStyle is BOARD_COLOR_BG
173+
context dose fillText with PLAYER_TWO_POINTS x+10 y+10
168174

169175
wow
170176
wow

toe.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)