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
24 votes
4 answers
2k views

Solve Hitori Puzzles

Introduction Write a solver for the Hitori puzzles using least bytes. Challenge Your task is write a solver for the Hitori (ひとり, the word for "alone" in Japanese; the meaning of the game name is "...
Weijun Zhou's user avatar
  • 3,637
13 votes
3 answers
2k views

Hexcellent Minesweeping

Hexcells is a game based off of Minesweeper played on hexagons. (Full disclosure: I have nothing to do with Hexcells. In fact I don't really like the game.) Most of Hexcells rules can be pretty ...
Wheat Wizard's user avatar
  • 98.7k
17 votes
15 answers
4k views

Help my son find his letters

Background Based on a game my four-year-old got from his rabbi. The "goal" is to "find" the letters in a given order, e.g. aecdb. You are given ...
Adám's user avatar
  • 30.2k
39 votes
26 answers
3k views

Draw me a domino

Challenge Given two digits 0-9 as input, output a domino (from the double-nine domino set) with these number of pips (dots) on the two faces. The ten possible faces look like this (separated by pipes)...
ETHproductions's user avatar
47 votes
6 answers
4k views

Let's Play Mafia!

Mafia (also known as Werewolf) is a party game that plays roughly like this: The game begins on day 0. After every day n comes a night ...
user avatar
12 votes
2 answers
743 views

Play a game of Dice Cricket

Dice Cricket is a game I was introduced to as a child and have used as a way to pass time for years since. I couldn't find a Wikipedia page so I'll explain the rules below. Dice Cricket Rules ...
caird coinheringaahin g's user avatar
33 votes
3 answers
30k views

Google's doodle on kids coding: shortest program solving all the levels

Today's Google doodle is about Celebrating 50 years of Kids Coding: The goal is program the path of a little bunny so that it can eat all the carrots. There are 4 types of blocks (see pictures below): ...
Surb's user avatar
  • 441
24 votes
7 answers
5k views

Who will win a Rock, Paper, Scissors, Lizard, Spock game?

There are several questions regarding this game, even a king-of-the-hill contest here. But I think all those challenges and contests need a way to automatically determine the winner of a game. So: ...
Charlie's user avatar
  • 12.9k
11 votes
2 answers
686 views

Minecraft Inventory Management

Minecraft inventory management is hard. You have 17 diamonds, but you need 7 to craft an enchantment table, a pickaxe, and a sword. Do you pick them up and right click 7 times? Or do you right click ...
hyper-neutrino's user avatar
  • 42.4k
32 votes
34 answers
6k views

First-price sealed-bid auction

Final Result The competition is over. Congratulations to hard_coded! Some interesting facts: In 31600 out of 40920 auctions (77.2%), the winner of the first round ...
Colera Su's user avatar
  • 2,421
18 votes
3 answers
955 views

Draw 'Til You Drop

In Dungeons & Dragons 5th edition (as well as most other editions), there exists a magic item called the Deck of Many Things. It is an incredibly powerful item, as the cards all have very strong ...
user avatar
18 votes
5 answers
934 views

Change the rules of Life

Life-like cellular automaton are cellular automaton that are similar to Conway's Game of Life, in that they operate on a (theoretically) infinitely large square grid, where each cell has exactly 8 ...
caird coinheringaahin g's user avatar
59 votes
27 answers
9k views

Honest Rock, Paper, Scissors

Many people consider RPS to be a game of chance. If both players play unpredictably, the best strategy is to play randomly. However, let's introduce a bit of predictability to it. Each bot will have ...
Gryphon's user avatar
  • 7,235
9 votes
4 answers
517 views

Badugi, Who Wins?

Inspired by this challenge and related to this one. Background Badugi [bæduːɡiː] is a low-ball draw-poker variant. The Pokerstars World Cup Of Online Poker $1K event starts within 3 hours and I'll ...
Jonathan Allan's user avatar
8 votes
4 answers
1k views

1326 starting hold'em combos

The goal is to get all combinations of hold'em starting hands (every two card combination) in the shortest amount of code. A hold'em hand is two distinct cards dealt from a standard deck of 52 cards, ...
lessharm's user avatar
7 votes
1 answer
409 views

Playing Darts: become an amateur with the most efficient prioritizing

Introduction: I think most people will know how darts work. But since some might not, here are the rules of playing Darts in a nutshell: Amount of players: 2 Starting points: 501 Goal: Get your ...
Kevin Cruijssen's user avatar
8 votes
4 answers
501 views

Who will win Ghost?

The game of Ghost is played between two players who alternate saying a letter on each turn. At each point, the letters so far must start some valid English word. The loser is the player to complete ...
Daniel Schepler's user avatar
20 votes
5 answers
1k views

Is this a losing square?

There is a game called Get Home that is played on the a chess board. In this game there is a single piece that is moved by both players in turns. There are some rules to how the piece can be moved. ...
Wheat Wizard's user avatar
  • 98.7k
13 votes
3 answers
745 views

Return of the Hydra Slayer

Its been a while since you killed that hydra, you basked in the glory for years, but now people are calling you washed up, a has been. Well its time you prove them wrong, you've heard the whereabouts ...
Wheat Wizard's user avatar
  • 98.7k
15 votes
2 answers
1k views

Become the Hydra Slayer

You are the best and most famous hero of the area. Lately there have been rumors that a Hydra has been hanging out in a nearby ravine. Being the brave and virtuous hero that you are you figure you'll ...
Wheat Wizard's user avatar
  • 98.7k
32 votes
2 answers
865 views

Will Mario fall into the Shrinking Satellite? (Diagram added)

Super Mario Galaxy features two rhombicuboctahedron-shaped* planets tiled with platforms that shrink as Mario runs across. Should Mario fall into a triangular hole or a gap left by a tile he ...
darrylyeo's user avatar
  • 7,897
15 votes
10 answers
631 views

Risk Battle: Going Down

Given two lists of dice rolls for a battle in Risk, your program or function must output how many troops each player loses. Background You do not have to read this, for it is merely background. ...
fireflame241's user avatar
  • 16.3k
23 votes
13 answers
16k views

ASCII Hangman in Progress

(inspired by a question over on Code Review) Suppose two people are playing Hangman, but you've only overheard the game and want to draw the current status. Given two words as input, where the words ...
AdmBorkBork's user avatar
  • 43.4k
18 votes
2 answers
1k views

Solve a Matchstick puzzle

On puzzling SE there are what are called "matchstick problems" in which math is written in match sticks and you are allowed to move a certain number of them to get a certain property. In this ...
Wheat Wizard's user avatar
  • 98.7k
104 votes
32 answers
13k views

Formic Functions - Ant Queen of the Hill Contest

Watch live | Active answers | Add new answer | Chat room | Source code | Leaderboard New tournaments whenever needed. New players and new updates very welcome. Not actual game footage. Each player ...
trichoplax is on Codidact now's user avatar
16 votes
4 answers
2k views

Make a Minecraft Crafting Table

Don't you hate it when you can't remember how to craft something in Minecraft? Well, time to remedy that! Task Your task is to take an input, either as a 1D or 2D list and output what item is a ...
caird coinheringaahin g's user avatar
35 votes
15 answers
5k views

How much Mana do I need?

Dungeon Master was one of the first ever real-time role-playing games, originally released in 1987 on the Atari ST. Among other exciting things for the time, it offered a rather sophisticated spell ...
Arnauld's user avatar
  • 192k
10 votes
2 answers
348 views

Plant trees on a golf course!

This challenge is inspired by this app. This is a much easier version of this challenge. This challenge is code-golf, while the other one is fastest-code. You'll be given a square input grid, of ...
Stewie Griffin's user avatar
20 votes
4 answers
710 views

Plant trees in a park - As fast as you can!

This challenge is inspired by this app. The test cases are borrowed from that app. This is a fastest-code challenge, where the objective is to solve the largest test cases in the least amount of time....
Stewie Griffin's user avatar
30 votes
11 answers
2k views

Which wire to cut

This task is about compressing and processing a sequence of conditionals. In the game Keep Talking and Nobody Explodes, a bomb defuser must disarm a bomb with the help of instructions relayed by ...
xnor's user avatar
  • 145k
11 votes
13 answers
1k views

The weird and wild bean game

Maybe some of you already know this game: you have a collection of jelly beans of different colors. For every color, the bean can have different tastes, some are good and some are bad, and you cannot ...
Charlie's user avatar
  • 12.9k
22 votes
21 answers
5k views

CSI: Minecraft Items

Minecraft 1.12 will be released tomorrow, so let's celebrate! Write code that takes in a non-negative integer N which represents the number of items of something in Minecraft. Output it in a way more ...
Calvin's Hobbies's user avatar
18 votes
15 answers
3k views

Convert Japanese Mario titles to American titles

The naming conventions for games in the Super Mario series is very strange, and don't match up between regions. ...
Julian Lachniet's user avatar
15 votes
2 answers
985 views

Binary Tetris in tweets

There was recently (a few years back) some buzz on programming websites about an implementation of Tetris in 140 Bytes. ... It turns out that although it is small, it is a simplified version of ...
user avatar
10 votes
3 answers
2k views

Binary Puzzle Solver

Introduction Rules of the puzzle: The puzzle Binary (also known as Takuzu or Subiku) is very simple to understand, and has only a few rules: Since the name of the game is binary it's pretty obvious, ...
Kevin Cruijssen's user avatar
27 votes
6 answers
2k views

Team of The Hill!

This challenge was inspired by @HelkaHomba's excellent challenge Red vs. Blue - Pixel Team Battlebots. That challenge was probably the best one I've seen on this site. Ever. My challenge is still a ...
user avatar
13 votes
0 answers
1k views

Golf an unbeatable chopsticks bot [closed]

From Wikipedia: Chopsticks is a hand game for two players, in which players extend a number of fingers from each hand and transfer those scores by taking turns to tap one hand against another. In ...
betseg's user avatar
  • 8,733
22 votes
17 answers
3k views

Connect Four Validator

Introduction Connect Four is a game where you attempt to get four in a row: horizontally, vertically, or diagonally. In this code golf, we will be trying to find who won, given a game board. There ...
Neil's user avatar
  • 2,525
1 vote
1 answer
275 views

Self Referential Puzzle - medium 2 [closed]

The following puzzle was asked in puzzling SE. This puzzle is quite hard to solve by hand because every answer depends on another answer. So, for example, a solution with all answers being A does not ...
usernameiwantedwasalreadytaken's user avatar
24 votes
13 answers
3k views

Is my Diffy game degenerate?

Recently I posted a question about Diffy games which has gone unanswered. Thats fine, the question is really hard, but I would like to make an easier question about Diffy games so that we can get the ...
Wheat Wizard's user avatar
  • 98.7k
70 votes
10 answers
6k views

Rock, Polyglot, Scissors

Write a program that is a polyglot in three languages that plays rock–paper–scissors. The input for any version of the program is always one of the strings rock or ...
Calvin's Hobbies's user avatar
16 votes
2 answers
804 views

King of the Hill: Bank Heist

Example run added 4/11 Rules Clarification 4/8: All submissions will be competing in one giant free-for-all tournament consisting of as many matches as my computer can perform in 48 hours. Anyone ...
quintopia's user avatar
  • 4,138
27 votes
1 answer
1k views

Find Diffy Games

A fun game to play if you are bored is the Diffy Game. It is a one player game that is pretty simple and can consume a good deal of your time. The Diffy game works like as follows: You start with a ...
Wheat Wizard's user avatar
  • 98.7k
17 votes
1 answer
2k views

Life: Created or Evolved?

Given the state of a square Game of Life grid, determine whether it could have evolved from any previous state, or could only have been created. That is, identify whether the state is a "Garden of ...
user avatar
1 vote
1 answer
467 views

Run a game of Flood

This is a Code Golf challenge. Flood is a game in which the player is presented with a game board such as this: On each turn, you choose a colour (on the link above, by clicking a square containing ...
Glen O's user avatar
  • 2,918
5 votes
2 answers
316 views

Uni-Dimensional String Golf

Introduction You have to simulate playing golf over an input string that represents the green. The 2-character substring () represents the hole, and is guaranteed ...
marcosm's user avatar
  • 1,136
72 votes
48 answers
9k views

Magic the Gathering: Friends or Foes?

In the card game Magic: the Gathering there are five different colours, which represent loose affiliations of cards, White (W), Blue (...
Martin Ender's user avatar
11 votes
4 answers
544 views

Name the Brag Hand

Background Brag is a card game similar in concept to, but simpler than, poker. A hand in brag consists of three cards and is ranked as follows from highest to lowest: Three of a kind - all three ...
IanF1's user avatar
  • 212
28 votes
12 answers
3k views

Terra Mystica: Cycling Power

The boardgame Terra Mystica has some very interesting mechanics for one of the primary resources, power. Instead of gaining and spending units of power from a bank, each player starts the game with ...
Martin Ender's user avatar
16 votes
10 answers
864 views

Find the outcome of a game of War

Find the outcome of a game of War When I was in elementary school, there was a "Rock-Paper-Scissors"-ish game we'd play during assemblies, when waiting for our teacher, at recess etc. We called it "...
Carcigenicate's user avatar

1 2
3
4 5
7