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
7
votes
4answers
403 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, ...
15
votes
4answers
724 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 ...
15
votes
3answers
814 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 ...
22
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 ...
25
votes
9answers
2k views

Score a game of Bowling

Your task is to sum up and output one player's score in a game of 10-pin bowling after up to 21 rolls. The rolls are represented as a sequence of integers in your preferred method of input. Each ...
37
votes
41answers
4k 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 ...
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 ...
9
votes
4answers
424 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 ...
34
votes
28answers
6k 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 ...
7
votes
1answer
341 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
425 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
984 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. ...
23
votes
1answer
546 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 ...
17
votes
4answers
1k 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 ...
19
votes
5answers
4k views

2048 Bot Challenge

We have been cloning 2048, analyzing 2048, but why haven't we played it yet? Write a 555 byte javascript snippet to play 2048 automatically, the best score after an hour will count (see scoring below)....
17
votes
2answers
657 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 ...
15
votes
4answers
714 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 ...
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 ...
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 ...
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 <...
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 ...
20
votes
4answers
630 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....
16
votes
4answers
6k views

Best Scoring Boggle Board

I was interested in seeing the answers to this (now defunct) question, but it has never been corrected/improved. Given a set of 6-sided Boggle dice (configuration stolen from this question), ...
27
votes
1answer
968 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
3answers
961 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 ...
16
votes
2answers
787 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 ...
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
696 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 ...
13
votes
0answers
750 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 ...
1
vote
1answer
262 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 ...
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 ...
10
votes
4answers
493 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 ...
1
vote
1answer
439 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 ...
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
793 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 "...
16
votes
1answer
467 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 ...
19
votes
1answer
984 views

Unique Sudoku Finder

Challenge: Given a Sudoku board on standard input, find the minimum number of numbers added to make the board unique. Specifics/Rules: The input is formatted as follows (all whitespace is ...
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: ...
14
votes
8answers
472 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,...
9
votes
2answers
568 views

2D Dungeon Crawler

Your program has to take a multi-lined string, like this: ############# # # # p # # # ############# ...
12
votes
0answers
408 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 ...
16
votes
2answers
999 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 ...
3
votes
1answer
642 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 ...
6
votes
3answers
566 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 ...
12
votes
1answer
900 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: ...
19
votes
4answers
683 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 ...
9
votes
0answers
285 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 ...
17
votes
2answers
747 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 ...
10
votes
7answers
1k views

Bingo card generator

A Bingo card is five columns of five squares each, with the middle square designated "FREE". Numbers cannot duplicate. The five columns are populated with the following range of numbers: B:1-15 I:...