Questions tagged [game]

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

23
votes
11answers
2k 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
575 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 ...
103
votes
31answers
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
581 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 ...
32
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
294 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
619 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
2k 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
774 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
729 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, ...
28
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 ...
11
votes
0answers
589 views

Golf an unbeatable chopsticks bot

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 ...
19
votes
10answers
1k 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
261 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 ...
69
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
682 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
962 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
434 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
292 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 ...
64
votes
45answers
8k 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 (...
10
votes
4answers
487 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
774 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 "...
38
votes
3answers
778 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 ...
69
votes
46answers
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
63 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
561 views

2D Dungeon Crawler

Your program has to take a multi-lined string, like this: ############# # # # p # # # ############# ...
29
votes
6answers
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
572 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
4k 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 ...
11
votes
0answers
386 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
897 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
524 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 ...
7
votes
0answers
271 views

Code Golf: BlackJack - best moves

The Challenge I was looking into small code examples for a specific language as a small tutorial and came accross a simplified Blackjack that should be implemented. In this Challenge you will have to ...
45
votes
47answers
5k views

Count without 3

Background When I was in elementary school, we used to play a game in math class that goes as follows. All kids sit in a big circle and take turns counting, starting from 1. However, the following ...
18
votes
2answers
715 views

Play a game of Yahtzee

In the game Yahtzee, players take turns rolling 5 6-sided dice up to three times per turn, possibly saving dice between rolls, and then selecting a category they wish to use for their roll. This ...
6
votes
8answers
405 views

Display a Connect Four game

Connect Four is a game where two players take turns to drop disks into columns of a vertically mounted grid, and attempt to connect four disks orthogonally or diagonally. When a column is chosen, the ...
21
votes
3answers
1k views

A game of atomic proportions

Your task make a bot that plays Atomas, with the highest score. How the game works: The gameboard starts with a ring of 6 "atoms", with numbers ranging from 1 to <...
14
votes
1answer
350 views

Checkers: King Me?

Challenge: Given a checkerboard, output the smallest amount of moves it would take (assuming black does not move at all) to king a red piece, if possible. Rules: Red's side will always be on the ...
11
votes
2answers
472 views

Become the Champion

Tic-Tac-Latin! This is a true story, so names have been altered. My latin teacher, Mr. Latin, created his own proprietary (no joke) tic tac toe variant. Let's call it tic-tac-latin. The game is ...
0
votes
0answers
187 views

Hangman solver algorithm [duplicate]

Please do not delete this without reading it completely. Put it in unclear if there are some questions. I will respond immediately. This is different from the question "Write a Hangman Solver" because ...
18
votes
2answers
524 views

What's your next move?

This challenge is to write a minimax function in a language of your choice, to output the next best move in an NxN game of tic-tac-toe given the current board state. The board input can be accepted as ...
11
votes
17answers
6k views

Pokemon GO Evolution Cost Calculator

Tired of always wondering how many more Pokémon you need to catch to get those high-tier evolutions? Wonder no more! Now you will write a complete program or function to calculate it for you! The ...
18
votes
13answers
3k views

Evaluate a Dice 10,000 roll

Introduction Dice 10,000 is a dice game which can be played with 6 dice and something to write. Players roll the dice multiple times a turn and gain a score at the end of it. The player who reaches ...
8
votes
2answers
631 views

Guard your can with your life!

Lets Play Kick The Can! Although Moogie is the current winner, if anyone can take his crown they are encouraged to do so Kick the can is a children's game. Involving one defender, and multiple ...