This challenge is generally based upon, related to, or simulates a game or some portion of one.

learn more… | top users | synonyms

6
votes
1answer
180 views

Guard your can with your life!

Lets Play Kick The Can! Kick the can is a children's game. Involving one defender, and multiple attackers. Today it is no longer such a game! Your job is to write a bot that plays it, to win, king-of-...
10
votes
5answers
342 views

Evaluate a Stratego Battle

In the game Stratego, the main game mechanic is when you attack an opponent's piece with yours. In this challenge, you job is to simulate one of these battles and say who survives. Specs You will ...
11
votes
2answers
276 views

Calculate the 3BV of a Minesweeper Board

The 3BV of a Minesweeper board represents the minimum number of left clicks required to solve the board if you already know the solution. It stands for "Bechtel's Board Benchmark Value". Here's his ...
14
votes
4answers
342 views

Determine the winner of a game of War

The card game War is interesting in that the final outcome is entirely determined by the initial arrangement of the deck, so long as certain rules are followed for the order in which cards are picked ...
10
votes
2answers
237 views

Simulate a 'battle' in the playing card game 'Oorlog'

Let's build a simulation for an aspect in the card game, which I personally know by the Dutch name 'Oorlog' (translates to 'War'). How does 'Oorlog' work? Two decks of cards (each including two ...
23
votes
6answers
2k views

Golf a golf-scorer

As a kid, I used to play the card game "golf" a lot. Your challenge, should you choose to accept it, is to calculate the score of a golf hand. Since there are over 9000 variations on this card game1, ...
7
votes
2answers
270 views

Generate ASCII TetraVex

TetraVex is a tile-based edge-matching game that was originally coded by Scott Ferguson for the Microsoft Entertainment Pack 3 back in 1990. The game consists of a grid upon which square tiles are ...
9
votes
4answers
542 views

Winnable Solitaire Mancala Boards

Mancala is the name of a family of board games that usually involve a series of cups filled with beads that the players manipulate. This challenge will use a specific rule set for a solitaire variant ...
15
votes
7answers
292 views

Evaluate a minimax tree

Alice and Bob are playing a little game. First, they draw a tree from a root node (indicated by a thick dot), with no internal nodes, with numbers at the leaves. Any node may have any number of ...
10
votes
1answer
303 views

Crosses, no Noughts

Everyone realizes that Tic Tac Toe is a solved game. However, the Misère version of only-Xs provides an interesting alternative. In this version of the game, both players play Xs onto the board and ...
9
votes
4answers
353 views

Score a game of Load, Defend and Shoot

When I was a child, I used to play this game a lot. Rules There are two players (let's call them A and B), and each player uses his hands as guns. There are three possible moves: Hands up to load ...
14
votes
0answers
292 views

Help develop Alphys' newest puzzle!

Alphys, the Underground's Royal Scientist, has finished a prototype for a new puzzle. However, she can't seem to find anyone willing to test it. The rules of her puzzle are as follows: The goal is ...
29
votes
34answers
3k views

Yahtzee Small Straight Detection

In the game Yahtzee, players roll five six-sided dice, and attempt to create certain hands to score points. One such hand is a small straight: four consecutive numbers, not necessarily in order. The ...
16
votes
2answers
446 views

Count Mills in Nine Men's Morris

Introduction Nine Mens's Morris (also called Mills) is a board game for two players which is played on the following board (image taken from the linked Wikipedia-page): Each player has 9 men, ...
17
votes
8answers
2k views

Who's gonna win the football game?

The American football championship, Super Bowl 50, is happening today at 11:30pm UTC (and you can watch it live online). This challenge was made to celebrate it. In an American football game, two ...
10
votes
3answers
630 views

Help me Shut the Box

The inspiration for this challenge should be ridiculously obvious at the time of posting. The Task You must create a Shut the Box style program (not function, program). The basics of shut the box ...
33
votes
28answers
5k views

Choose The Powerball Numbers!

Powerball is an American lottery that has recently gained attention because the current jackpot (as of January 11, 2016) is the largest lotto prize in history, at about $1.5 billion (USD). Powerball ...
26
votes
9answers
1k views

“You must construct additional pylons!”

Introduction In the strategy game Starcraft 2, there are three "races" to choose from: Terran, Zerg, and Protoss. In this challenge we will be focusing on the Protoss and the iconic phrase "You must ...
7
votes
0answers
189 views

Make a Frogger Solver

🐸🐸 You must make the shortest program to always find the optimal solution to a simplified Frogger game on a 9x9 grid. Course Elements: L - Log (Length: 3-4). When you hop on a log it carries ...
15
votes
1answer
244 views

Can I live here?

In the game Terraria, one of the game mechanics involves building houses so that an NPC can move in. There is a strict set of rules for what counts as a valid house or not. Here is the list of rules: ...
31
votes
32answers
4k views

Russian Roulette, Reloaded

Let's play Russian Roulette! Normally, this would be a race to write the shortest MOD 6 program, but that's not very realistic, as the chance of winning decreases with each click. Here are the rules: ...
12
votes
7answers
375 views

D&D Skill Challenges

In Dungeons & Dragons, almost everything is decided by rolling a die. Typically, if the roll is greater than or equal to a specified value, your attempt at doing whatever you wanted to do succeeds,...
14
votes
11answers
809 views

The game of Sevens! Who said what?

The game of Sevens is played as follows: n players sit in a circle, and start counting up from 1, passing to the left (or from player A to player B). When a number p that has a 7 in it OR is ...
14
votes
25answers
2k views

Number of pieces on a checkers board

Introduction A normal checkers board contains 8 x 8 = 64 squares: You can see that in total, there are 12 white pieces. Black and white always have the same amount of pieces. If there are any more ...
16
votes
4answers
748 views

Can you win with two more moves at Three Men's Morris?

Bounties No. 1 (awarded) I'll throw in 50 rep for the first valid answer No. 2 (awarded) I'll throw in another 100 rep for the shortest valid answer. No. 3 (open for submissions) I'll ...
12
votes
0answers
263 views

Determine winner of Connect 4

You are given a partially filled Connect 4 grid (7x6). O X O X X O X O O X O X O X X O X X X O O X O O O X X O X (Input can be given as a 1D or 2D array and as letters ...
12
votes
7answers
733 views

A flat guessing game

There is a game I like to play. It happens on a grid of finite size (but it's wrapped, like a sphere). On that grid, a random (integer-only) point is selected. Then, I, the user, am prompted for a ...
17
votes
2answers
672 views

The Combinatorics of Transistor

The video game Transistor features a very interesting ability system. You collect 16 "Functions" which you can use in 16 different slots. What's interesting is that there are 3 types of slots and ...
12
votes
6answers
414 views

Simulate a game of Craps

Craps is a fairly simple dice game often played in casinos. Even if you aren't a gambler (which I'm not), it's still a fairly interesting game. Here's the rules: At the start of a game of Craps there'...
19
votes
2answers
814 views

Koopa Shell Sequence

In various Super Mario games green and red Koopa Troopa shells can slide frictionlessly on flat surfaces and destroy brick blocks that are in their way. When a shell hits a brick block the block ...
31
votes
4answers
2k views

Invert a Minesweeper Board

Minesweeper is a popular computer game that you have probably wasted time playing where you try to reveal the cells that are mines in a rectangular grid based on hints of how many neighboring mines ...
15
votes
5answers
1k views

Hidden Power Calculator

One of the reasons I've always loved Pokemon is because for such a simple-seeming game, it has so many layers of complexity. Let's consider the move Hidden Power. In game, the type and power (at least ...
4
votes
4answers
300 views

Role-Playing Game Dice-Rolling

Background When playing an RPG such as Dungeons & Dragons, Pathfinder, or Paranoia, players each need a set of dice. You are hosting one such game this weekend, and some of the friends you ...
11
votes
3answers
354 views

Possible Tetris sequences

Write code to figure out whether a run of Tetris pieces could be generated by the official Tetris algorithm. Fewest bytes wins. Official Tetris games generate the sequence of falling pieces in a ...
14
votes
0answers
404 views

Magic: the Gathering Combat Golf

Magic: the Gathering is a trading card game where, among other things, players play cards representing creatures, which can then attack the other player, or defend against the other player's attacks ...
6
votes
4answers
640 views

Let's play Hangman?

According to this page, the best strategy to guess English hangman words is to calculate the odds of each letter in a word list that meet our conditions. But, as I'm really lazy, I don't really want ...
6
votes
0answers
444 views

Take It or Leave It III: A Game Show for Computers

This is the third in a series of puzzles that I will be posting every Monday at Midnight PST, and the final variant of "Take It or Leave It". The first puzzle is located Here The second puzzle is ...
8
votes
2answers
623 views

ASCII Game of Pong

Ascii Pong The challenge is to recreate the classic game "pong" in ASCII characters in the shortest code possible. Requirements/specifications The "screen" should be 45x25 characters. White space ...
20
votes
7answers
3k views

Take It or Leave It II: A Game Show for Computers

This is the second in a series of puzzles that I will be posting every Monday at Midnight PST. The first puzzle is located Here. Context: A reclusive billionaire has created a game show to ...
28
votes
5answers
2k views

Take It or Leave It: A Game Show for Computers

Context: A reclusive billionaire has created a game show to attract the world's best and brightest programmers. On Mondays at the stroke of midnight, he chooses one person from a pool of ...
4
votes
3answers
404 views

Avoid the Bullet Bills

In 2D Mario, Bullet Bill cannons are two units tall. The Bullet Bill is fired out of the upper unit and travels in a straight line (parallel to the x axis). Mario is two units tall when standing up ...
12
votes
1answer
139 views

Check over hand values for single-suited Mahjong

Mahjong is a tile game that is immensely popular in Asia. It is typically played with four players, and the goal of the game is to be the first person to complete a valid hand using the tiles. In ...
17
votes
4answers
622 views

Roll my D&D character's ability scores

In Dungeons and Dragons, some of the most important atributes of a character are the ability scores. There are 6 ability scores, for the six abilities. The abilities are Strength, Dexterity, ...
18
votes
1answer
446 views

Automatic price-identification of scrolls in Nethack

OH GODS NO!! You can't leave us here with Doorknob! It'll be nethack everywhere! - 1d ago by Geobits Well, couldn't disappoint... Introduction (you can skip this section if you don't care about ...
6
votes
4answers
357 views

Find the optimal nim move

The game Nim is a mathematical strategy game, where 2 players take turns taking items from distinct heaps. On your turn, you must take at least one item, and you may take as many as you want, ...
7
votes
1answer
555 views

Snakes and Ladders probability of winning

(This is my first Q here, and I don't know much about code golfing.) Your aim is to predict the winner of an ongoing Snakes and Ladders game. INPUT A single number (2-1000) indicating the number ...
19
votes
4answers
782 views

Golf Your Favorite Minecraft Tool

In Minecraft, the default item textures are all reasonably simple 16×16 pixel images, which makes them seem ideal for golfing. Below are simplified textures of the five "core" diamond tools in ...
37
votes
5answers
2k views

Block Building Bot Flocks!

The contest is over! Intro This is an interactive king-of-the-hill contest where the controller is fully contained in a Stack Snippet at the bottom of the question. The controller automatically ...
8
votes
1answer
347 views

aBOTcalypse Now

aBOTcalypse Design a bot to compete in a King-of-the-Hill challenge! Here's a replay of a default bot game. The board is 2D, like a side-scrolling video game (but without any scrolling). A valid ...
34
votes
4answers
838 views

Let's play Meta tic-tac-toe!

Lets play a game of Meta tic-tac-toe! This is a king-of-the-hill tournament of Meta tic-tac-toe. The rules of Meta tic-tac-toe are as follows: All of the regular rules of tic-tac-toe apply. There ...