Whack a Mullah
A fun little game for everyone who dislikes mullahs.
How to play:
Copy this code into a text editor such as Notepad.
Save the file as an HTML format, such as “WhackAMullah.html”
Load the file into your browser.
Have fun!
Screenshot:
Question:
Is there a way to get it to run directly in Substack? Or to host it somewhere for free?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Whack-a-Mullah</title>
<style>
body { margin: 0; background: #111; display: flex; justify-content: center; align-items: center; height: 100vh; font-family: Arial; }
canvas { border: 8px solid #0a0; border-radius: 15px; box-shadow: 0 0 30px #0f0; }
#score { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); color: #0f0; font-size: 32px; text-shadow: 0 0 10px #0f0; }
#title { position: absolute; top: 80px; left: 50%; transform: translateX(-50%); color: lime; font-size: 48px; text-shadow: 0 0 15px lime; letter-spacing: 4px; }
</style>
</head>
<body>
<div id="title">WHACK-A-MULLAH</div>
<div id="score">Score: 0</div>
<canvas id="game" width="800" height="500"></canvas>
<script>
const canvas = document.getElementById('game');
const ctx = canvas.getContext('2d');
const scoreEl = document.getElementById('score');
let score = 0;
let mullahs = [];
let hammerX = 400, hammerY = 300;
let isHammerDown = false;
let gameTime = 60;
let timer = gameTime;
const holes = [
{x: 200, y: 250}, {x: 400, y: 220}, {x: 600, y: 260},
{x: 250, y: 380}, {x: 550, y: 370}
];
class Mullah {
constructor(x, y) {
this.x = x;
this.y = y;
this.size = 80;
this.visible = false;
this.timer = 0;
this.popTime = Math.random() * 120 + 60;
}
update() {
this.timer++;
if (this.timer > this.popTime) {
this.visible = !this.visible;
this.timer = 0;
this.popTime = Math.random() * 100 + 50;
}
}
draw() {
if (!this.visible) return;
ctx.save();
ctx.translate(this.x, this.y);
// Head
ctx.fillStyle = '#c9a06b';
ctx.beginPath();
ctx.ellipse(0, -10, 35, 40, 0, 0, Math.PI * 2);
ctx.fill();
// Turban
ctx.fillStyle = '#111';
ctx.beginPath();
ctx.ellipse(0, -35, 38, 18, 0, 0, Math.PI * 2);
ctx.fill();
// Beard
ctx.fillStyle = '#333';
ctx.beginPath();
ctx.ellipse(0, 18, 28, 22, 0, 0, Math.PI * 2);
ctx.fill();
// Eyes & mouth
ctx.fillStyle = '#fff';
ctx.fillRect(-12, -18, 8, 8);
ctx.fillRect(4, -18, 8, 8);
ctx.fillStyle = '#000';
ctx.fillRect(-10, -16, 4, 4);
ctx.fillRect(6, -16, 4, 4);
ctx.strokeStyle = '#000';
ctx.lineWidth = 3;
ctx.beginPath();
ctx.moveTo(-15, 8);
ctx.quadraticCurveTo(0, 25, 15, 8);
ctx.stroke();
ctx.restore();
}
}
holes.forEach(h => mullahs.push(new Mullah(h.x, h.y)));
function drawHammer(x, y, down) {
ctx.save();
ctx.translate(x, y);
if (down) ctx.rotate(0.6);
// Wooden handle
ctx.strokeStyle = '#8B4513';
ctx.lineWidth = 14;
ctx.beginPath();
ctx.moveTo(0, -72);
ctx.lineTo(0, 52);
ctx.stroke();
// Hammer head - Israeli flag (bigger version)
const headW = 96; // significantly bigger
const headH = 50; // significantly bigger
const headY = -94;
// White background
ctx.fillStyle = '#ffffff';
ctx.fillRect(-headW/2, headY, headW, headH);
// Two blue stripes (top and bottom)
ctx.fillStyle = '#0033a0';
ctx.fillRect(-headW/2, headY, headW, 11);
ctx.fillRect(-headW/2, headY + headH - 11, headW, 11);
// Star of David - larger and bold
ctx.fillStyle = '#0033a0';
const cx = 0;
const cy = headY + headH / 2;
const r = 19.5; // bigger star
// Main hexagram
ctx.beginPath();
for (let i = 0; i < 6; i++) {
const ang = i * Math.PI / 3 - Math.PI / 2;
ctx.lineTo(cx + r * Math.cos(ang), cy + r * Math.sin(ang));
}
ctx.closePath();
ctx.fill();
// Inner inverted triangle for full Star of David
ctx.beginPath();
for (let i = 0; i < 6; i++) {
const ang = i * Math.PI / 3 + Math.PI / 2;
ctx.lineTo(cx + r * 0.58 * Math.cos(ang), cy + r * 0.58 * Math.sin(ang));
}
ctx.closePath();
ctx.fill();
ctx.restore();
}
function gameLoop() {
ctx.fillStyle = '#0a3';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.strokeStyle = '#0f0';
ctx.lineWidth = 25;
ctx.strokeRect(40, 80, 720, 380);
ctx.fillStyle = '#ff0';
ctx.font = 'bold 48px Arial';
ctx.textAlign = 'center';
ctx.fillText('WHACK-A-MULLAH', 400, 140);
mullahs.forEach(m => {
m.update();
m.draw();
});
drawHammer(hammerX, hammerY, isHammerDown);
ctx.fillStyle = '#ff0';
ctx.font = 'bold 28px Arial';
ctx.fillText(`TIME: ${timer}`, 650, 60);
scoreEl.textContent = `Score: ${score}`;
if (timer > 0) {
requestAnimationFrame(gameLoop);
} else {
ctx.fillStyle = 'rgba(0,0,0,0.8)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = '#f00';
ctx.font = 'bold 60px Arial';
ctx.fillText('GAME OVER', 400, 250);
ctx.font = 'bold 40px Arial';
ctx.fillStyle = '#ff0';
ctx.fillText(`FINAL SCORE: ${score}`, 400, 320);
}
}
canvas.addEventListener('mousemove', e => {
const rect = canvas.getBoundingClientRect();
hammerX = e.clientX - rect.left;
hammerY = e.clientY - rect.top;
});
canvas.addEventListener('mousedown', () => {
isHammerDown = true;
mullahs.forEach(m => {
if (m.visible) {
const dx = hammerX - m.x;
const dy = hammerY - m.y + 42;
if (dx*dx + dy*dy < 2800) {
score += 100;
m.visible = false;
m.timer = 0;
}
}
});
setTimeout(() => isHammerDown = false, 120);
});
setInterval(() => { if (timer > 0) timer--; }, 1000);
gameLoop();
</script>
</body>
</html>SUPPORT “PROJECT PHOENIX”
Upgrade to a paid subscription and receive FOUR ebooks (PDF files) as a thank you! Including the book “Project Phoenix UK”.
My calling is to do something positive, every day, to push back against the darkness that is surrounding us now. The encircling gloom.
I have written over 20 books, with more coming. See the Book Catalogue article, below. My books are supportive of our freedoms, and are supportive of Israel.
I was fired from my job as an electronics engineer at a UK university. My “crime”: writing a book that criticises Islam. I have subsequently written numerous more books on this topic. I cannot now get another professional job, as I am on the blacklist of Hope not Hate. I have to subsist on low value jobs such as gardening and dog sitting. And selling books too!
I ask for your support, it is gratefully received. Please upgrade to a paid subscription and / or buy me a coffee. It is appreciated!
Paid subscribers to my substack receive FOUR free ebooks (PDF files). After subscribing, go to the article below to download them. Note that your payment will appear with the description: “BOOKS AND SUBSCRIPTION” on your bank statement.
You can also support my work via “Buy me a coffee”. Here is the link: https://buymeacoffee.com/hellish2050 Note: the page is sometimes slow to load (20+ seconds), be patient!





Sorry but this brain does not compute! What in the world??
BWAH HAH HAH!!