File size: 7,591 Bytes
2b6dcfa
7219ae6
2b6dcfa
7219ae6
 
 
2b6dcfa
 
 
 
7219ae6
 
 
 
2b6dcfa
 
 
7219ae6
2b6dcfa
 
 
7219ae6
2b6dcfa
 
 
 
 
 
 
7219ae6
 
 
 
 
 
 
2b6dcfa
7219ae6
2b6dcfa
 
 
7219ae6
2b6dcfa
 
7219ae6
 
 
 
 
2b6dcfa
7219ae6
2b6dcfa
 
7219ae6
 
 
2b6dcfa
 
7219ae6
 
 
 
2b6dcfa
 
7219ae6
 
 
2b6dcfa
7219ae6
2b6dcfa
7219ae6
 
2b6dcfa
 
 
7219ae6
 
 
2b6dcfa
 
7219ae6
 
 
 
 
2b6dcfa
 
7219ae6
 
2b6dcfa
 
7219ae6
 
 
 
 
 
 
2b6dcfa
 
7219ae6
 
 
 
 
 
 
 
2b6dcfa
 
7219ae6
 
 
2b6dcfa
 
 
 
 
7219ae6
 
 
2b6dcfa
7219ae6
 
 
 
 
2b6dcfa
 
 
7219ae6
 
 
 
2b6dcfa
7219ae6
 
 
 
2b6dcfa
7219ae6
 
 
2b6dcfa
 
 
7219ae6
2b6dcfa
 
 
 
7219ae6
2b6dcfa
7219ae6
2b6dcfa
 
 
 
 
 
7219ae6
2b6dcfa
7219ae6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2b6dcfa
7219ae6
2b6dcfa
7219ae6
2b6dcfa
7219ae6
 
 
 
2b6dcfa
 
7219ae6
 
 
 
 
 
 
 
 
2b6dcfa
 
7219ae6
 
2b6dcfa
 
 
7219ae6
 
 
 
 
 
2b6dcfa
 
 
7219ae6
 
 
 
 
2b6dcfa
 
7219ae6
 
 
 
 
 
 
 
 
 
2b6dcfa
 
7219ae6
 
 
2b6dcfa
 
 
108a605
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>I'M NOT A ROBOT √</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background: #000;
            color: #0f0;
            font-family: 'Courier New', monospace;
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        #matrix {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
        }

        #title {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 3em;
            text-shadow: 0 0 10px #0f0;
            z-index: 2;
            cursor: pointer;
            text-align: center;
        }

        #gameContainer {
            display: none;
            position: relative;
            width: 80%;
            max-width: 600px;
            background: #107C10;
            border: 2px solid #1ED760;
            border-radius: 10px;
            padding: 20px;
            z-index: 2;
        }

        .question {
            margin-bottom: 20px;
            font-size: 1.2em;
        }

        .options {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }

        button {
            background: #1ED760;
            color: black;
            border: none;
            padding: 10px;
            cursor: pointer;
            font-family: 'Courier New', monospace;
            border-radius: 5px;
            transition: all 0.3s;
        }

        button:hover {
            background: #2EE770;
            transform: scale(1.05);
        }

        #status {
            position: absolute;
            top: 10px;
            right: 10px;
            font-size: 1.2em;
        }

        .glitch {
            animation: glitch 0.5s infinite;
        }

        @keyframes glitch {
            0% { transform: translate(-50%, -50%) skew(0deg); }
            20% { transform: translate(-52%, -50%) skew(2deg); }
            40% { transform: translate(-48%, -50%) skew(-2deg); }
            60% { transform: translate(-50%, -52%) skew(1deg); }
            80% { transform: translate(-51%, -48%) skew(-1deg); }
            100% { transform: translate(-50%, -50%) skew(0deg); }
        }

        .scanline {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background: rgba(0, 255, 0, 0.2);
            animation: scan 6s linear infinite;
        }

        @keyframes scan {
            0% { top: 0; }
            100% { top: 100%; }
        }
    </style>
</head>
<body>
    <canvas id="matrix"></canvas>
    <div id="title" class="glitch">
        I'M NOT A ROBOT √<br>
        <span style="font-size: 0.5em">Click √ to start</span>
    </div>
    <div id="gameContainer">
        <div class="scanline"></div>
        <div id="status">Score: 0 | Lives: 3</div>
        <div id="question" class="question"></div>
        <div id="options" class="options"></div>
    </div>

    <script>
        const matrix = document.getElementById('matrix');
        const ctx = matrix.getContext('2d');
        let width = matrix.width = window.innerWidth;
        let height = matrix.height = window.innerHeight;

        const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()';
        const drops = [];
        const fontSize = 10;
        const columns = width / fontSize;

        for(let i = 0; i < columns; i++) {
            drops[i] = 1;
        }

        function drawMatrix() {
            ctx.fillStyle = 'rgba(0, 0, 0, 0.05)';
            ctx.fillRect(0, 0, width, height);
            ctx.fillStyle = '#0F0';
            ctx.font = fontSize + 'px monospace';

            for(let i = 0; i < drops.length; i++) {
                const text = chars[Math.floor(Math.random() * chars.length)];
                ctx.fillText(text, i * fontSize, drops[i] * fontSize);
                if(drops[i] * fontSize > height && Math.random() > 0.975) {
                    drops[i] = 0;
                }
                drops[i]++;
            }
        }

        setInterval(drawMatrix, 33);

        let score = 0;
        let lives = 3;
        const questions = [
            {
                question: "Select the number that looks different",
                options: ["1", "1", "1", "l"],
                correct: 3
            },
            {
                question: "Which color is NOT green?",
                options: ["#00FF00", "#008000", "#FF0000", "#90EE90"],
                correct: 2
            },
            {
                question: "Complete the sequence: 2, 4, 8, 16, ?",
                options: ["20", "32", "24", "28"],
                correct: 1
            },
            {
                question: "Which is not a prime number?",
                options: ["2", "3", "4", "7"],
                correct: 2
            },
            {
                question: "Solve: (√144 Γ— 2) Γ· 4",
                options: ["6", "12", "24", "3"],
                correct: 0
            }
        ];

        document.getElementById('title').addEventListener('click', startGame);

        function startGame() {
            document.getElementById('title').style.display = 'none';
            document.getElementById('gameContainer').style.display = 'block';
            showQuestion();
        }

        function showQuestion() {
            const questionEl = document.getElementById('question');
            const optionsEl = document.getElementById('options');
            const currentQ = questions[Math.floor(Math.random() * questions.length)];
            
            questionEl.textContent = currentQ.question;
            optionsEl.innerHTML = '';
            
            currentQ.options.forEach((option, index) => {
                const button = document.createElement('button');
                button.textContent = option;
                button.addEventListener('click', () => checkAnswer(index === currentQ.correct));
                optionsEl.appendChild(button);
            });
        }

        function checkAnswer(correct) {
            if(correct) {
                score++;
                if(score >= 10) {
                    alert('Congratulations! You proved you are human!');
                    resetGame();
                    return;
                }
            } else {
                lives--;
                if(lives <= 0) {
                    alert('Game Over! You must be a robot!');
                    resetGame();
                    return;
                }
            }
            document.getElementById('status').textContent = `Score: ${score} | Lives: ${lives}`;
            showQuestion();
        }

        function resetGame() {
            score = 0;
            lives = 3;
            document.getElementById('status').textContent = `Score: ${score} | Lives: ${lives}`;
            document.getElementById('gameContainer').style.display = 'none';
            document.getElementById('title').style.display = 'block';
        }

        window.addEventListener('resize', () => {
            width = matrix.width = window.innerWidth;
            height = matrix.height = window.innerHeight;
        });
    </script>
</body>
</html>