Skip to main content

Questions tagged [game]

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

Filter by
Sorted by
Tagged with
36 votes
41 answers
5k views

The Cake Cutting Contest

It's my 17th birthday and you're invited to my party! And as always at parties, there will be cake. One cake... And you need as much of it as possible. As this is a fair party, each of us will ...
Blue's user avatar
  • 28.6k
34 votes
7 answers
3k 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 ...
Calvin's Hobbies's user avatar
15 votes
5 answers
4k 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 ...
a spaghetto's user avatar
  • 11.2k
5 votes
5 answers
624 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 ...
mbomb007's user avatar
  • 23.4k
13 votes
4 answers
529 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 ...
xnor's user avatar
  • 145k
31 votes
1 answer
2k 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 ...
isaacg's user avatar
  • 42k
8 votes
5 answers
1k 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 ...
WayToDoor's user avatar
  • 469
9 votes
1 answer
733 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 ...
LivingInformation's user avatar
9 votes
2 answers
2k 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 ...
Eric Vincent's user avatar
20 votes
7 answers
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 attract ...
LivingInformation's user avatar
29 votes
5 answers
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 applicants ...
LivingInformation's user avatar
4 votes
3 answers
574 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 ...
Nick B.'s user avatar
  • 305
3 votes
0 answers
866 views

"Talos Principle" Tetris Puzzle Generator [closed]

In Talos Principle, from time to time player has to solve a puzzle that looks like this: Source: http://uk.ign.com/wikis/the-talos-principle/File%3A20141108_134749.jpg This puzzle is already solved -...
d33tah's user avatar
  • 397
12 votes
1 answer
307 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 ...
Sp3000's user avatar
  • 61.9k
19 votes
4 answers
1k 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, ...
isaacg's user avatar
  • 42k
23 votes
1 answer
1k 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 ...
Doorknob's user avatar
  • 71.5k
10 votes
6 answers
1k 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, ...
DJMcMayhem's user avatar
  • 59.2k
7 votes
1 answer
4k 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 of ...
ghosts_in_the_code's user avatar
29 votes
9 answers
2k 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 ...
Calvin's Hobbies's user avatar
43 votes
5 answers
3k 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 ...
Calvin's Hobbies's user avatar
8 votes
1 answer
421 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 ...
sirpercival's user avatar
  • 1,824
39 votes
4 answers
2k 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 ...
DJMcMayhem's user avatar
  • 59.2k
22 votes
2 answers
834 views

Can you cast the spell?

In Magic: the Gathering, mages (known as "planeswalkers") battle each other by casting spells. Spells cost mana. Five colors of mana exist: White, Blue, Black, Red, and Green, represented as {W}, {U}, ...
Rainbolt's user avatar
  • 6,376
25 votes
3 answers
2k views

Leonhard loves labyrinths

The background My son Leonhard (4 years old) loves labyrinths. I don't know where he knows labyrinths from, but he paints them and knows quite well how they work: Recently, he started making a game ...
Thomas Weller's user avatar
36 votes
4 answers
4k views

Optimal Games of Tic Tac Torus

This challenge is about the game Tic Tac Toe, but it's played on a torus. How to play To create the necessary game board, you start out with a regular Tic Tac Toe game board. First fold it into a ...
Jakube's user avatar
  • 21.9k
21 votes
2 answers
974 views

Prepare to... die?

Background One source of ennui in tabletop role-playing games is dealing with rolls involving many dice. Casting a Disintegration spell may be instantaneous, but rolling and adding together 40 dice ...
Uri Granta's user avatar
  • 2,959
134 votes
22 answers
13k views

Red vs. Blue - Pixel Team Battlebots

This contest is officially over. The Blue Team won! I autoran two sets of 50 battles and amazingly, Blue won all 100 of them. Looking at the stats, it is clear that the cooperative entries of PhiNotPi ...
Calvin's Hobbies's user avatar
8 votes
2 answers
490 views

Evening Commute Solver

I recently moved to an apartment overlooking the inner ring-road of town, and every day, a beautiful scene unfolds. The traffic lights are apparently so confusing (mostly because the Dutch are used to ...
Sanchises's user avatar
  • 9,496
17 votes
2 answers
721 views

Food shortage in the Snakepit

Food shortage in the Snakepit For the first time in 35 years, the snakepit is running out of food. The inhabitant snakes now have to fight each other in order to survive this food shortage. Only one ...
redevined's user avatar
  • 1,331
28 votes
21 answers
4k views

Morra, the Noble Game of Kings

Background The game of Morra is a simple game. In the "original" version, several players simultaneously throw out a number 0-5 with their hands while guessing the total sum of everyone's hands. ...
PhiNotPi's user avatar
  • 29.1k
55 votes
9 answers
5k views

Codémon, I choose you!

Your kindly neighbour, Doctor Tree, just gave you three magical creatures called Codémon. There's a battle tournament in the nearby town of Colorville. Are you the very best, like no one ever was? ...
Geobits's user avatar
  • 19.7k
9 votes
1 answer
561 views

Rock-paper-scissors competition simulator

You decided to organize a rock-paper-scissors championship to find out who is the best. You don't want to let luck to decide the winner so everyone has to give you his or her tactic in writing before ...
randomra's user avatar
  • 20.9k
1 vote
1 answer
210 views

Automated Bulls and Cows Player [duplicate]

This is a code golf challenge to see the shortest implementation of an automated guesser in the pen and paper game bulls and cows. The game works as follows: A (usually 4 digit) secret code with ...
ericmarkmartin's user avatar
14 votes
2 answers
749 views

Winning Strategies for a String Construction Game

Background Alice and Bob play a game called construct a binary word. To play the game, you fix a length n >= 0, a set G of ...
Zgarb's user avatar
  • 42.6k
16 votes
2 answers
1k views

Score a game of Kingdom Builder

I want to try a new form of code golf here. Similar to bonuses, not all parts of the challenge have to be completed, but each answer has to implement a subset of certain size (and there is a core that ...
Martin Ender's user avatar
54 votes
2 answers
4k views

Build a fewest-moves freecell solver

In the game of Freecell, you are tasked with building four foundation piles in suit from ace to king, on a layout where you build downward in alternating colours. However, you can only build one card ...
Joe Z.'s user avatar
  • 34.9k
14 votes
4 answers
1k views

Write a Magic Spellchecker

The game Waving Hands is somewhere between a pen-and-paper Magic: the Gathering and a very elaborate Rock Paper Scissors. Each turn you write down one of eight gestures for each hand: wiggled ...
Martin Ender's user avatar
35 votes
11 answers
3k views

Verify a Minesweeper board

Your goal is to check whether a completed Minesweeper board is valid. This means that each number is a correct count of mines in cells adjacent to it, including diagonals. The board does not wrap ...
xnor's user avatar
  • 145k
16 votes
5 answers
2k views

Play Wythoff's Nim perfectly

Your goal is to write a perfect player for the game of Wythoff's Nim. Rules of Wythoff's Nim Wythoff's Nim is a deterministic two-player game played with two piles of identical counters. Players ...
xnor's user avatar
  • 145k
1 vote
0 answers
83 views

Solving Des Chiffres Et Des Lettres - The total is right [duplicate]

One of the games of the French TV show Des chiffres et des lettres, called Le compte est bon ('The total is right'), consists of the following : You get a number A between 101 and 999 as well as six ...
Hippalectryon's user avatar
1 vote
0 answers
59 views

Automate xmpp requests to ESL website to challenge opponents [closed]

ESL gaming, where you can challenge players to play games. I've provided some steps you can take manually to challenge a player. Note that you have to signup for an account and have to be logged in to ...
user3995789's user avatar
25 votes
3 answers
2k views

Place a Carcassonne tile

The board game In the board game "Carcassonne" players place tiles by matching their edges and earn the highest scores through creating large contiguous areas of terrain. The following are (roughly) ...
jsh's user avatar
  • 919
15 votes
3 answers
8k views

Are You the One? (Mastermind Derivative)

I've got a tough one for you! My girlfriend recently came across a new show on MTV (USA). It's a terrible show, and everyone on it is trashy, but the "game" is pretty interesting. From Wikipedia: ...
dberm22's user avatar
  • 522
14 votes
4 answers
1k views

Scriptbot Warz!

Scriptbot Warz! The results are in and Assassin is our champion, winning 2 of 3 matches! Thanks to everyone who submitted their Scriptbots! Special thanks to horns for BestOpportunityBot which ...
Rip Leeb's user avatar
  • 1,240
5 votes
1 answer
666 views

Make your country proud!

You are from the tiny country of Que-Wopistan. The Que-Wopistonion's are a proud people, and every Que-Wopistonian dreams of making their country proud by representing their country in the Olympics. ...
DJMcMayhem's user avatar
  • 59.2k
15 votes
3 answers
3k views

What are you waiting for? (A mahjong solver)

Idea thanks to @MartinBüttner from a discussion in chat 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 ...
Sp3000's user avatar
  • 61.9k
9 votes
11 answers
3k views

Bulgarian Solitaire

Bulgarian Solitaire is a single-player game made popular by Martin Gardner in his mathematical column in Scientific American. You have N identical cards, split ...
xnor's user avatar
  • 145k
14 votes
4 answers
660 views

Resolve doubling and tripling actions in Dominion

Inspiration This question is inspired by the cards Throne Room and King's Court from the popular deck-building card game Dominion. As part of one's turn, one plays a sequence of actions. These ...
xnor's user avatar
  • 145k
17 votes
4 answers
2k views

Program a 2048 AI using an existing Framework

EDIT : Recently, my question has been proposed as a duplicate of 2048 Bot Challenge. I would like to stress that this question is different from that question, and will require answers to be thought ...
Sam Weaver's user avatar
6 votes
5 answers
633 views

The color spelling game

In the color spelling game, you are shown a list of color names, but rather than reading the words that are written, you have to say the name of the color of the letters. The game is over as soon as ...
GOTO 0's user avatar
  • 822

1
3 4
5
6 7