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
18
votes
3answers
897 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 ...
15
votes
4answers
747 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 ...
58
votes
27answers
8k 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 ...
9
votes
4answers
432 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 ...
7
votes
4answers
432 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, ...
7
votes
1answer
349 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 ...
8
votes
4answers
428 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 ...
19
votes
5answers
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. ...
13
votes
4answers
683 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 ...
13
votes
1answer
785 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 ...
23
votes
1answer
571 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 ...
16
votes
10answers
587 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. ...
21
votes
11answers
3k 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 ...
17
votes
2answers
742 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 ...
104
votes
32answers
11k 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 ...
15
votes
4answers
836 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 ...
33
votes
15answers
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 ...
10
votes
2answers
299 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 ...
20
votes
4answers
650 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....
29
votes
11answers
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 ...
11
votes
13answers
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 ...
22
votes
19answers
4k 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 ...
16
votes
15answers
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. ...
16
votes
2answers
819 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 ...
10
votes
3answers
833 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, ...
27
votes
6answers
1k 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 ...
13
votes
0answers
808 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 ...
20
votes
11answers
2k 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 ...
1
vote
1answer
264 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 ...
23
votes
12answers
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 ...
68
votes
10answers
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 ...
15
votes
2answers
716 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 ...
27
votes
1answer
987 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 ...
17
votes
1answer
1k 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 ...
1
vote
1answer
444 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 ...
6
votes
2answers
295 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 ...
68
votes
47answers
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 (...
11
votes
4answers
496 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 ...
28
votes
12answers
2k 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 ...
15
votes
10answers
815 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 "...
39
votes
3answers
1k views

Tool-Assisted Code Golf

TAS Golf In the style of a tool-assisted speedrun with a code-golf twist, the goal of this challenge is to complete World 1-1 of the original Super Mario Bros game for the NES in your chosen ...
71
votes
50answers
7k views

Score rock-paper-scissors

Given two string inputs of "Rock", "Paper", or "Scissors", determine the outcome of the RPS round. Output 1 if the first player wins, -1 if the second player wins, or 0 for a tie. ...
2
votes
0answers
66 views

Score a hand of Cribbage! [duplicate]

Goal: Given a hand of 5 cards, determine its value in the game Cribbage. Input a string through any reasonable means. You can assume the string will always be in this format: ...
9
votes
2answers
572 views

2D Dungeon Crawler

Your program has to take a multi-lined string, like this: ############# # # # p # # # ############# ...
31
votes
7answers
2k views

Can I sweep the mines?

Minesweeper is a popular puzzle game where you must discover which tiles are "mines" without clicking on those tiles. Instead, you click on nearby tiles to reveal the number of adjacent mines. One ...
3
votes
1answer
673 views

Witness My Challenge (Tetris Puzzle)

Introduction In the game The Witness (possible spoilers ahead) there is a group of puzzles that involve drawing a Tetris piece with your line while making sure that the symbol for the Tetris piece ...
15
votes
3answers
5k views

Dobble/SpotIt card generator

Introduction Dobble/SpotIt is a card game, where people have to spot same symbol on pair of cards in shortest time, indicate it and move to next pair. Each card has multiple symbols (8 in normal ...
13
votes
0answers
423 views

Hexasweep (part 1): The Solver

(This is part 1 in a two-part challenge.) Your task is to solve a Hexasweep puzzle. A Hexasweep puzzle is set out on a grid of diamonds arranged in hexagonal shapes, of which the board looks like a ...
12
votes
1answer
903 views

I want to watch you die of thirst

You are a traveller crossing the desert between two towns. You cannot carry enough water to get across without stopping. This is a variation of a classic puzzle. The Rules A desert looks like this: ...
6
votes
3answers
600 views

Japanese Mahjong Score Calculator

I'm new to Japanese Mahjong and have trouble calculating the scores. Please help me write a program to calculate it. Introduction (aka you can skip this boring part) Mahjong is a popular tile game ...