Skip to content

Commit 38f95db

Browse files
Update index.html
1 parent dcb8f0f commit 38f95db

File tree

1 file changed

+53
-12
lines changed

1 file changed

+53
-12
lines changed

index.html

Lines changed: 53 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
</style>
1010
</head>
1111
<body>
12-
<a href="https://github.com/thetechnocrat-dev/thetechnocrat-dev.github.io/blob/main/index.html#L158" target="_blank">
13-
<img src="github-logo.png" alt="GitHub Logo" width="24" height="24">
14-
<span>This game is open source</span>
12+
<a href="https://github.com/thetechnocrat-dev/thetechnocrat-dev.github.io/blob/main/index.html#L202" target="_blank" style="text-decoration: none; color: #3A78AB; font-family: Arial, sans-serif; font-size: 18px; background-color: #F8F9FA; border: 1px solid #3A78AB; border-radius: 5px; padding: 10px;">
13+
<img src="github-logo.png" alt="GitHub Logo" width="24" height="24" style="vertical-align: middle; margin-right: 10px;">
14+
<span>This Game is Open Source</span>
1515
</a>
16+
1617
<canvas id="gameCanvas"></canvas>
1718
<script>
1819
var canvas = document.getElementById('gameCanvas');
@@ -92,8 +93,8 @@
9293
var endAngleOuter = startAngleOuter + Math.PI * 2 - player.radius * 3 / goal.radius;
9394
var outerCircleRadius = goal.radius * 1.618 ** 3
9495
outerCirclePath.arc(goal.x, goal.y, outerCircleRadius, startAngleOuter, endAngleOuter);
95-
ctx.strokeStyle = 'red';
96-
ctx.lineWidth = 5;
96+
ctx.strokeStyle = '#482475';
97+
ctx.lineWidth = 8;
9798
ctx.stroke(outerCirclePath);
9899

99100
// Create and store the path for the middle rotating circle
@@ -103,8 +104,8 @@
103104
var endAngleMiddle = startAngleMiddle + Math.PI * 2 - player.radius * 3 / goal.radius;
104105
var middleCircleRadius = goal.radius * 1.618 ** 2
105106
middleCirclePath.arc(goal.x, goal.y, middleCircleRadius, startAngleMiddle, endAngleMiddle);
106-
ctx.strokeStyle = 'blue';
107-
ctx.lineWidth = 5;
107+
ctx.strokeStyle = '#482475';
108+
ctx.lineWidth = 8;
108109
ctx.stroke(middleCirclePath);
109110

110111
// Create and store the path for the inner rotating circle
@@ -114,8 +115,8 @@
114115
var endAngleInner = startAngleInner + Math.PI * 2 - player.radius * 3 / goal.radius;
115116
var innerCircleRadius = goal.radius * 1.618
116117
innerCirclePath.arc(goal.x, goal.y, innerCircleRadius, startAngleInner, endAngleInner);
117-
ctx.strokeStyle = 'purple';
118-
ctx.lineWidth = 5;
118+
ctx.strokeStyle = '#482475';
119+
ctx.lineWidth = 8;
119120
ctx.stroke(innerCirclePath);
120121

121122
var playerPath = new Path2D();
@@ -171,19 +172,59 @@
171172
}, 1000);
172173
}
173174

174-
175175
// Draw the player
176176
ctx.beginPath();
177177
ctx.arc(player.x, player.y, player.radius, 0, Math.PI * 2);
178-
ctx.fillStyle = 'blue';
178+
ctx.fillStyle = '#3A78AB';
179179
ctx.fill();
180180

181181
// Draw the goal
182182
ctx.beginPath();
183183
ctx.arc(goal.x, goal.y, goal.radius, 0, Math.PI * 2);
184-
ctx.fillStyle = 'green';
184+
ctx.fillStyle = '#AA6C39';
185+
ctx.fill();
186+
187+
// Draw the circle part of the keyhole
188+
ctx.beginPath();
189+
ctx.arc(goal.x, goal.y - goal.radius / 4, goal.radius / 4, 0, Math.PI * 2, true); // true means counter-clockwise
190+
ctx.fillStyle = 'white';
185191
ctx.fill();
186192

193+
// Draw the triangular part of the keyhole
194+
ctx.beginPath();
195+
ctx.moveTo(goal.x, goal.y - goal.radius / 4); // Starting point of the triangle (the tip)
196+
ctx.lineTo(goal.x - goal.radius / 4, goal.y + goal.radius / 2); // Bottom left corner of the triangle
197+
ctx.lineTo(goal.x + goal.radius / 4, goal.y + goal.radius / 2); // Bottom right corner of the triangle
198+
ctx.closePath();
199+
ctx.fillStyle = 'white';
200+
ctx.fill();
201+
202+
// Check for winning condition (within the keyhole)
203+
if (player.x > goal.x - goal.radius && player.x < goal.x + goal.radius &&
204+
player.y > goal.y && player.y < goal.y + goal.radius) {
205+
alert("You win! Check the source code for a longer message");
206+
/*
207+
Godel's Gauntlet is an impossible game due to self-referencing of the player's position.
208+
You must win by contradicting the coded rules of the game and changing the source code.
209+
(Or for the lazy peek at the source code.) To join my semi-secret math hacker club,
210+
please dm me the answer to the following riddle:
211+
212+
When you measure how I rise over time, you are just measuring me, what am I?
213+
*/
214+
player.target = {};
215+
player.reset = true;
216+
player.freeze = true;
217+
setTimeout(function() {
218+
console.log('done freeze')
219+
player.freeze = false;
220+
player.x = canvas.width / 2;
221+
player.y = 50;
222+
player.vx = 0;
223+
player.vy = 0;
224+
}, 1000);
225+
}
226+
227+
187228
// Request next animation frame
188229
requestAnimationFrame(gameLoop);
189230
}

0 commit comments

Comments
 (0)