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
12 answers
3k views

Are These Scores Possible?

Background In the sport of Table Tennis (aka Ping-Pong or Whiff Whaff), two opponents play a sequence of rounds, where each round consists of players hitting a ball back and forth until one player (...
fireflame241's user avatar
  • 16.3k
26 votes
4 answers
1k views

Baba is golf, flag is win

If you haven't played the game Baba is You, I think you really should. Whether you’ve played it or not, have a go at implementing it as a code golf. The idea behind this challenge is to have a bit ...
MarcinKonowalczyk's user avatar
32 votes
12 answers
2k views

Implement Entombed's lookup table

Background Entombed is an Atari 2600 game released in 1982, with the goal of navigating through a continuous mirrored maze as it scrolls upwards. In recent times, the game has been subject to research ...
sporeball's user avatar
  • 1,656
3 votes
0 answers
145 views

Chinese checkers adjacent squares [closed]

Challenge You have a Chinese Checkers board looking like this: ...
applemonkey496's user avatar
15 votes
3 answers
485 views

Solve a Picross Row

Introduction A picross, also known as a nonogram, is a logic puzzle in which the player is given an initially blank grid and must shade in particular boxes on the grid to reveal an image. Numbers are ...
golf69's user avatar
  • 2,059
7 votes
15 answers
1k views

Russian Roulette, varying chances [duplicate]

Russian roulette It's Russian roulette! The rules are simple. Shoot a revolver with n slots for bullets and one round inside at your head and you might not die! ...
Wezl's user avatar
  • 1,478
2 votes
1 answer
133 views

Code golfing my guess the number game with feedback in NS-HUBASIC - Can it be code golfed any further?

The player has to keep guessing a number from 1 to 10 until they guess the correct number to win the game. If they make an incorrect guess, they're told if their guess was too low or too high. Each ...
Niall Ward's user avatar
7 votes
1 answer
424 views

The shortest way of getting rid of these numbers

This is a simple game of getting rid of those damn numbers. You start with the numbers from 1 to 19, written in a grid of 9 by 3: 1 2 3 4 5 6 7 8 9 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 You may ...
ThE_-_BliZZarD's user avatar
18 votes
4 answers
1k views

Game of Game of Life

Game of Game of Life Conway's Game of Life is a 0-player game. But that's okay! We can make it a multi-player game. This game is played on the smallest square grid that will accommodate a 6x6 ...
Spitemaster's user avatar
  • 2,135
10 votes
1 answer
279 views

Count the Shantens

Introduction to Mahjong tiles Mahjong (麻雀) is a board game that originates from China. Mahjong tiles used in this challenge are in Unicode points U+1F000 – U+1F021: ...
Dannyu NDos's user avatar
  • 5,941
20 votes
3 answers
581 views

On the Subject of Memory

This challenge is from a game called Keep Talking And Nobody Explodes. Memory is a fragile thing but so is everything else when a bomb goes off, so pay attention! – from the manual The Objective A ...
Dannyu NDos's user avatar
  • 5,941
10 votes
2 answers
615 views

Play Big 2 by yourself, as fast as you can

Introduction Big 2 is a card game popular in East Asia and South East Asia, in which 4 players are dealt 13 cards each (ie, an equal division of a standard deck without jokers). The goal is to empty ...
aphrid's user avatar
  • 201
11 votes
0 answers
482 views

Morpion solitaire

Morpion solitaire This is a game that I remember having learnt from my grandparents in my childhood. Initially I didn't know the name. G B has found it to be Join Five (or less ambiguously - Morpion ...
Sopel's user avatar
  • 331
2 votes
1 answer
154 views

An "Iniative" game mechanic [closed]

This challenge is inspired by turn based videogames like "Heroes of Might and Magic" Implement this game mechanic: There is some units(Imps, Swordsmans etc...) in our game Every unit have an integer ...
Rundom's user avatar
  • 29
59 votes
29 answers
24k views

Cheat at Rock-Paper-Scissors-Lizard-Spock

When playing Rock-Paper-Scissors-Lizard-Spock, your robot reflexes let you see your opponent's throw before they make it. You just need to choose a throw that beats theirs, in as few bytes as possible ...
xnor's user avatar
  • 145k
15 votes
4 answers
515 views

List where pinballs would exit a grid of bumpers from different entrance points

Inspired by this lumosity mini game, Pinball Recall We start with a rectangular grid (viewed from above) with several bumpers as follows. Entrances/exits are numbered counter-clockwise starting from ...
kuantumleap123's user avatar
14 votes
35 answers
2k views

Determine the Winner of a Game of Australian Football

In Australian Football, goals are worth 6 points and behinds are worth 1 point. Scores may include the number of goals and behinds, as well as the total score. Given the number of goals and behinds ...
Stephen's user avatar
  • 13.8k
32 votes
29 answers
2k views

The Lucky House

There's a minigame in Super Mario 3D World known as the Lucky House. It consists of a slot machine with 4 blocks. Each block may be one of 5 different icons (Flower, Leaf, Bell, Cherry or Boomerang) ...
Arnauld's user avatar
  • 192k
17 votes
14 answers
3k views

Generate a random point outside a given rectangle within a map

Introduction Given this visualization of a playing field: ...
jaaq's user avatar
  • 617
11 votes
1 answer
297 views

Compute my Sacred Geometry [closed]

In the tabletop RPG named Pathfinder, there is a feat that characters can take called Sacred Geometry, which allows a character who has it to buff their spells in exchange for doing some math: to use ...
nick012000's user avatar
7 votes
1 answer
189 views

Letter Boxed, part 2: this time, solve it

This challenge is a sequel to Letter Boxed Validator. The New York Times has a daily online game called Letter Boxed (the link is behind a paywall; the game is also described here), presented on a ...
Robin Ryder's user avatar
  • 15.6k
15 votes
3 answers
550 views

Who can escape the Nonary Game?

The Nonary Game is a fictional game played in the video game trilogy of the same name. Your goal is to find how many players (at best) can escape a given game, in as few bytes of code as possible. ...
Grimmy's user avatar
  • 15.7k
25 votes
17 answers
3k views

Who won a Game of Bar Dice?

Challenge Bar Dice is a simple game played in a Bar with Dice (hence the name). You roll 5 six-sided dice and attempt to make the best hand. Scoring is based on amassing the largest number of ...
Veskah's user avatar
  • 4,110
28 votes
12 answers
2k views

Letter Boxed validator

The New York Times has a daily online game called Letter Boxed (the link is behind a paywall; the game is also described here), presented on a square as follows: You are given 4 groups of 3 letters (...
Robin Ryder's user avatar
  • 15.6k
27 votes
13 answers
2k views

Adventurers in the Ruins

Test Driver • Challenge Discussion • Submit Adventurer (Image Source) Several rival adventurers are raiding the ruins for treasure, but they can only carry so much at a time and have their ...
Beefster's user avatar
  • 9,931
10 votes
11 answers
1k views

Playing Pickomino

In the game Pickomino, there are several tiles lying in the middle of the table, each with a different positive integer on them. Each turn, the players roll dices in a certain way and get a score, ...
Kateba's user avatar
  • 1,252
40 votes
4 answers
2k views

Dungeon Crawler

Input A binary matrix \$M\$ representing the walls of a dungeon. The position \$(x,y)\$ of the player within the dungeon. The direction \$d\$ that the player is currently facing (0 = North, 1 = East, ...
Arnauld's user avatar
  • 192k
57 votes
49 answers
11k views

A game of dice, but avoid number 6

Tournament over! The tournament is now over! The final simulation was run during the night, a total of \$3*10^8\$ games. The winner is Christian Sievers with his bot OptFor2X. Christian Sievers also ...
maxb's user avatar
  • 6,887
9 votes
7 answers
463 views

Magic: The Gathering, Paying for Spells

For more MtG-goodness: Magic: The Gathering Combat with Abilities Premise: In Magic: the Gathering, you cast spells by paying their mana cost by tapping lands for the required amount. These lands ...
Veskah's user avatar
  • 4,110
1 vote
2 answers
244 views

Accordion Solitaire: Which First Moves Can I Make?

Introduction: Unfortunately an Accordion Solitaire Solver challenge already exists (Solve a game of Accordion), so instead this easier related challenge. Let's start by explaining how Accordion ...
Kevin Cruijssen's user avatar
11 votes
5 answers
603 views

Amidakuji (阿弥陀籤) simplification

If you have ever had any exposure to Japanese or East Asian culture you will have surely encountered the Amidakuji game: As Wikipedia explains, it is a type of lottery drawn on paper and used to ...
Tobia's user avatar
  • 5,681
24 votes
21 answers
2k views

Prisoner's Dilemma with access to opponent

In this challenge, you will write a bot that play's the prisoner's dilemma. Here's the catch: you will not have access to the history of previous games. Instead, you will have access to the opponent ...
soktinpk's user avatar
  • 4,462
11 votes
9 answers
2k views

Mid-Autumn Festival gambling game

Tomorrow is the Mid-Autumn festival, and in the spirit of that holiday, I will introduce a gambling game that we (people from Xiamen) play during the holiday! Rules The game is played with six 6-sided ...
Quintec's user avatar
  • 2,869
16 votes
7 answers
682 views

Magic: The Gathering Combat with Abilities

Related Goal: Given two creatures with optional combat abilities, return unique but consistent values that represent which creatures died, if any. Input: ...
Veskah's user avatar
  • 4,110
11 votes
21 answers
938 views

Minecraft Language Files Updater

In 1.13, Minecraft language files were switched from being a simple multi-line key=value format to JSON. Challenge Write a program converting from the original format returning a JSON string. Input ...
pfg's user avatar
  • 875
6 votes
5 answers
433 views

Watch the bookie win

When you roll a die, you have a 6:1 chance of any given option. There's a bookmaker taking bets on die rolls. He owns £20 at the start of the game. The bookmaker offers odds of 4:1, but gamblers ...
AJFaraday's user avatar
  • 11.8k
14 votes
10 answers
3k views

Let's practice the scoring rules of 421!

421 is a rather popular dice game in France and some other European countries. It is mostly played in bars and pubs to determine who's going to buy the next round of drinks. The full game is usually ...
Arnauld's user avatar
  • 192k
5 votes
1 answer
693 views

Bot: Outsnake the game!

So, I wrote a simple Javascript game (as yet unnamed) and naturally I wanted to write an API so I could write a bot to play it for me, and naturally I wanted to let the PPCG community have a go for ...
AJFaraday's user avatar
  • 11.8k
22 votes
8 answers
2k views

Score a single dart

Introduction Write a program or function that, given the coordinates of where a dart lands on a dartboard, return the score of that dart. Dart coordinates are given as two integers, ...
mypetlion's user avatar
  • 802
33 votes
15 answers
5k views

Let's play Mölkky!

Mölkky Mölkky is a Finnish throwing game. The players use a wooden pin (also called "mölkky") to try to knock over wooden pins of almost similar dimensions with the throwing pin, marked with ...
Arnauld's user avatar
  • 192k
36 votes
24 answers
4k views

Noisy Iterated Prisoner's Dilemma

In this challenge, you will play the noisy iterated prisoner's dilemma. The Prisoner's dilemma is a scenario in game theory where there are two players, each with two options: cooperate, or defect. ...
isaacg's user avatar
  • 42k
14 votes
6 answers
987 views

Will you be my Weaver?

I've been recently playing through 'The Weaver' and I think it presents an interesting challenge for code-golf. Premise: The Weaver is a game wherein you are given a number of ribbons coming from 2 ...
Asone Tuhid's user avatar
  • 2,363
48 votes
56 answers
5k views

Scrabble scorer

Challenge: Take a string of upper or lower case letters as input (optional), and calculate the score that string would get in a game of Scrabble in English. Rules: The score of each letter is as ...
Stewie Griffin's user avatar
33 votes
30 answers
8k views

Dollar Bill Auction

This is a KOTH challenge for the dollar bill auction game in game theory. In it, a dollar is being sold to the highest bidder. Bids go up in increments of 5¢, and the loser also pays their bid. The ...
RamenChef's user avatar
  • 1,214
24 votes
3 answers
780 views

Ice Golf Challenge

The goal of this challenge is to write a program or function that returns the least amount of strikes needed to complete a given course. Input The layout of the course can be passed in any suitable ...
Manfred Radlwimmer's user avatar
23 votes
16 answers
6k views

Alice and Bob have a fight

Alice (A) and Bob (B) decided to have a battle. Each combatant has 10 health. They take turns to roll a 6 sided die for damage. That damage is removed from their opponent's health. In the end either ...
AJFaraday's user avatar
  • 11.8k
12 votes
5 answers
580 views

Get Two from One

As we saw in this question complex logical statements can be expressed in terms of the simple connectives of generalized Minesweeper. However Generalized minesweeper still has redundancies. In order ...
Wheat Wizard's user avatar
  • 98.5k
10 votes
2 answers
785 views

How many draws are there in Quarto?

Introduction This challenge is similar to Project Euler problems. I came up with it because I was playing a deceivingly simple board game and couldn't come up with an efficient solution to answer a ...
wvdz's user avatar
  • 227
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.5k

1
2
3 4 5
7