All Questions
347
questions
14
votes
12
answers
3k
views
3 Dimensional Minesweeper
3-Dimensional Minesweeper
I've been on a minesweeper kick for a while, but all the questions are for 2 dimensions (or that one in 1D). But 2D is 2 easy!
Challenge
Write the shortest code possible to ...
27
votes
6
answers
3k
views
How many cacti can I plant here?
Given a Minecraft terrain as a 2-dimensional array of integers or similar datastructure, determine the maximum number of cacti that can be planted on it.
The integers represent the height (y) of the ...
29
votes
5
answers
2k
views
Can I Clear The Grid?
I recently found this game and have been enjoying it. Basically, there is a grid of colored tiles and you act by clicking on empty spaces. When you click an empty space, the first tile (if any) in ...
26
votes
9
answers
3k
views
Is it a Valid Crossword Grid?
In crossword terminology, the grid is the region into which the crossword answers are inserted, consisting of white and black squares. The crossword answers, called entries, are inserted into ...
30
votes
10
answers
3k
views
Implement grambulation
Consider the following spiral of positive integers:
We now define grambulation as a binary operation \$\lozenge : \mathbb N \times \mathbb N \to \mathbb N\$, using this grid. Some example inputs and ...
13
votes
16
answers
3k
views
Create a bingo card generator
Bingo
Bingo is a numbers game where players match randomly drawn numbers to the numbers on their cards. Each bingo card is a square grid with 25 spaces, and the columns of the grid are labeled with ...
13
votes
8
answers
1k
views
Toggle some bits and get an actual square
Inspired by the title of the Toggle some bits and get a square challenge.
In that challenge you output how many bits should be toggled, in order for the base-10 representation of the binary to become ...
6
votes
2
answers
389
views
Is this position a pure mirror mate?
Task
A pure mirror checkmate is a checkmate position, where the mated king is surrounded by 8 empty squares which are attacked or guarded by the winning side exactly once. You will be given a valid ...
5
votes
3
answers
170
views
CGAC2022 Day 15: Chimney cleaning, Part 2
Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details.
While other Elves are busy carrying air blowers, Fen comes and shouts, "I've got a spell for this job!"
...
9
votes
8
answers
692
views
CGAC2022 Day 14: Chimney cleaning
Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details.
As we all know, Santa comes down the chimney to deliver presents to good kids. But chimneys are normally full of ...
10
votes
6
answers
752
views
CGAC2022 Day 13: Santa's gift and the laser lock, Part 2
Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details.
You successfully route the laser into the sensor, but nothing happens.
"What?" Frustrated, you flip the ...
15
votes
7
answers
942
views
CGAC2022 Day 12: Santa's gift and the laser lock
Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details.
There's a good news and a bad news.
Good news: you got a Christmas present from Santa. (Already?! Christmas is two ...
16
votes
6
answers
1k
views
Santa's Shortest Path Problem
Santa's Shortest Path Problem
Trying to be as time-efficient as possible Santa needs to plan his trips carefully. Given a 5X5 grid representing a map of villages it is your task to be Santa's flight ...
11
votes
14
answers
2k
views
CGAC2022 Day 5: Preparing an advent calendar
Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details.
It's time to prepare an advent calendar, but I've only got a large sheet of rectangular paper, randomly colored red ...
15
votes
7
answers
1k
views
CGAC2022 Day 2: Self-trapping Elf
Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details.
An Elf is hopping on a chessboard which extends infinitely in all four directions. They move like a generalized ...