All Questions
237
questions
3
votes
1
answer
138
views
Detect revokes in Jass
Jass is a trick-taking game for four players and the national card game of Switzerland. It is played with a 36-card deck, four suits each with ranks 6, 7, 8, 9, 10, J, Q, K, A. We will be using French ...
16
votes
16
answers
2k
views
Play a sequential game of Rock Paper Scissors
The "sequential" game
A number of people stand in a line with their hands hidden in a pre-chosen state of either Rock ✊, Paper ✋ or Scissors ✌️. Here's an example line:
Initial Line
✌️ ✋ ✊ ...
3
votes
1
answer
187
views
Determine the optimal blackjack move
After the success of my baccarat challenge, I figured we should try a similar challenge for another casino game, blackjack.
Blackjack is a game played with two to eight decks of cards shuffled ...
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 ...
21
votes
8
answers
3k
views
Do you win a Numeric Mahjong?
Background
Numeric Mahjong is a hypothetical variation of Japanese Mahjong, played with nonnegative integers instead of Mahjong tiles. Given a list of nonnegative integers, it is a winning hand if it ...
14
votes
13
answers
3k
views
Play a game of memory
Playing the game of memory against a machine is highly unfair, because they play almost as good as small children. So let's make the machine play alone, but in a fair way:
Input: 1...26 pairs of ...
12
votes
4
answers
1k
views
Optimal Duck Game Moves
How to play the duck game
This is a 2-player game.
First, we start with a line of blue rubber ducks (represented here as circles):
🔵🔵🔵🔵🔵🔵🔵
Now, in each ...
6
votes
6
answers
972
views
Critical Calculations
Background
In the game stick ranger, there is an item which grants the character the ability to get critical hits.
Each time a projectile hits an enemy, it has some probability to be a critical hit (...
10
votes
12
answers
2k
views
Calculate Bloons RBE
In Bloons Tower Defense 6, the strength of different bloons can be measured by their Red Bloon Equivalent (RBE), or the number of single pops it takes to completely defeat the bloon.
The RBE for the ...
9
votes
5
answers
784
views
On The Subject Of Simon Says
This challenge is from a game, Keep Talking And Nobody Explodes.
This is like one of those toys you played with as a kid where you have to match the
pattern that appears, except this one is a knockoff ...
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 ...
11
votes
5
answers
686
views
CGAC2022 Day 19: I Made It Out Of Clay
Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details.
Happy Hanukkah!
A beloved Hanukkah tradition for many, the game of Dreidel (s'vivon in Hebrew) is a betting game (...
23
votes
8
answers
1k
views
Rolling a 1x1x2 block
Rolling a 1x1x2 block
This challenge is inspired by the game Bloxorz. Like that game, there is a 1x1x2 block, which may be moved on a square grid in any of the four cardinal directions. It moves by ...
22
votes
12
answers
2k
views
Does the sequence shut the box?
Determine whether a given sequence could be a winning sequence for the game shut the box.
Background
There are a few variants to this game, so I'll clarify the rules here. Play begins with 12 tiles (1 ...
15
votes
10
answers
1k
views
Count Futoshiki row solutions
Futoshiki is a logic puzzle where an \$n×n\$ Latin square must be completed based on given numbers and inequalities between adjacent cells. Each row and column must contain exactly one of each number ...