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
0
votes
0answers
190 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
527 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 ...
10
votes
2answers
657 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 ...
11
votes
5answers
407 views

Evaluate a Stratego Battle

In the game Stratego, the main game mechanic is when you attack an opponent's piece with yours. In this challenge, you job is to simulate one of these battles and say who survives. Specs You will ...
17
votes
3answers
935 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 ...
19
votes
4answers
677 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 ...
15
votes
3answers
810 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 ...
25
votes
8answers
2k views

Golf a golf-scorer

As a kid, I used to play the card game "golf" a lot. Your challenge, should you choose to accept it, is to calculate the score of a golf hand. Since there are over 9000 variations on this card game1, ...
7
votes
2answers
460 views

Generate ASCII TetraVex

TetraVex is a tile-based edge-matching game that was originally coded by Scott Ferguson for the Microsoft Entertainment Pack 3 back in 1990. The game consists of a grid upon which square tiles are ...
10
votes
4answers
653 views

Winnable Solitaire Mancala Boards

Mancala is the name of a family of board games that usually involve a series of cups filled with beads that the players manipulate. This challenge will use a specific rule set for a solitaire variant ...
15
votes
7answers
395 views

Evaluate a minimax tree

Alice and Bob are playing a little game. First, they draw a tree from a root node (indicated by a thick dot), with no internal nodes, with numbers at the leaves. Any node may have any number of ...
10
votes
1answer
360 views

Crosses, no Noughts

Everyone realizes that Tic Tac Toe is a solved game. However, the Misère version of only-Xs provides an interesting alternative. In this version of the game, both players play Xs onto the board and ...
11
votes
4answers
518 views

Score a game of Load, Defend and Shoot

When I was a child, I used to play this game a lot. Rules There are two players (let's call them A and B), and each player uses his hands as guns. There are three possible moves: Hands up to load ...
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 ...
34
votes
43answers
4k views

Yahtzee Small Straight Detection

In the game Yahtzee, players roll five six-sided dice, and attempt to create certain hands to score points. One such hand is a small straight: four consecutive numbers, not necessarily in order. The ...
21
votes
4answers
920 views

Count Mills in Nine Men's Morris

Introduction Nine Mens's Morris (also called Mills) is a board game for two players which is played on the following board (image taken from the linked Wikipedia-page): Each player has 9 men, ...
17
votes
8answers
2k views

Who's gonna win the football game?

The American football championship, Super Bowl 50, is happening today at 11:30pm UTC (and you can watch it live online). This challenge was made to celebrate it. In an American football game, two ...
12
votes
3answers
1k views

Help me Shut the Box

The inspiration for this challenge should be ridiculously obvious at the time of posting. The Task You must create a Shut the Box style program (not function, program). The basics of shut the box ...
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 ...
27
votes
9answers
1k views

“You must construct additional pylons!”

Introduction In the strategy game Starcraft 2, there are three "races" to choose from: Terran, Zerg, and Protoss. In this challenge we will be focusing on the Protoss and the iconic phrase "You must ...
12
votes
1answer
542 views

Make a Frogger Solver

🐸🐸 You must make the shortest program to always find the optimal solution to a simplified Frogger game on a 9x9 grid. Course Elements: L - Log (Length: 3-4). ...
16
votes
1answer
321 views

Can I live here?

In the game Terraria, one of the game mechanics involves building houses so that an NPC can move in. There is a strict set of rules for what counts as a valid house or not. Here is the list of rules: ...
32
votes
32answers
4k views

Russian Roulette, Reloaded

Let's play Russian Roulette! Normally, this would be a race to write the shortest MOD 6 program, but that's not very realistic, as the chance of winning decreases with each click. Here are the rules: ...
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,...
14
votes
11answers
986 views

The game of Sevens! Who said what?

The game of Sevens is played as follows: n players sit in a circle, and start counting up from 1, passing to the left (or from player ...
14
votes
25answers
2k views

Number of pieces on a checkers board

Introduction A normal checkers board contains 8 x 8 = 64 squares: You can see that in total, there are 12 white pieces. Black and white always have the same amount of pieces. If there are any more ...
16
votes
4answers
933 views

Can you win with two more moves at Three Men's Morris?

Bounties No. 1 (awarded) I'll throw in 50 rep for the first valid answer No. 2 (awarded) I'll throw in another 100 rep for the shortest valid answer. No. 3 (open for submissions) I'll ...
19
votes
1answer
791 views

Determine winner of Connect 4

You are given a partially filled Connect 4 grid (7x6). O X O X X O X O O X O X O X X O X X X O O X O O O X X O X (Input can be given ...
13
votes
7answers
827 views

A flat guessing game

There is a game I like to play. It happens on a grid of finite size (but it's wrapped, like a sphere). On that grid, a random (integer-only) point is selected. Then, I, the user, am prompted for a ...
20
votes
2answers
1k views

The Combinatorics of Transistor

The video game Transistor features a very interesting ability system. You collect 16 "Functions" which you can use in 16 different slots. What's interesting is that there are 3 types of slots and ...
18
votes
11answers
906 views

Simulate a game of Craps

Craps is a fairly simple dice game often played in casinos. Even if you aren't a gambler (which I'm not), it's still a fairly interesting game. Here's the rules: At the start of a game of Craps there'...
19
votes
2answers
874 views

Koopa Shell Sequence

In various Super Mario games green and red Koopa Troopa shells can slide frictionlessly on flat surfaces and destroy brick blocks that are in their way. When a shell hits a brick block the block ...
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 ...
32
votes
4answers
3k views

Invert a Minesweeper Board

Minesweeper is a popular computer game that you have probably wasted time playing where you try to reveal the cells that are mines in a rectangular grid based on hints of how many neighboring mines ...
15
votes
5answers
2k views

Hidden Power Calculator

One of the reasons I've always loved Pokemon is because for such a simple-seeming game, it has so many layers of complexity. Let's consider the move Hidden Power. In game, the type and power (at least ...
5
votes
5answers
510 views

Role-Playing Game Dice-Rolling

Background When playing an RPG such as Dungeons & Dragons, Pathfinder, or Paranoia, players each need a set of dice. You are hosting one such game this weekend, and some of the friends you ...
11
votes
3answers
427 views

Possible Tetris sequences

Write code to figure out whether a run of Tetris pieces could be generated by the official Tetris algorithm. Fewest bytes wins. Official Tetris games generate the sequence of falling pieces in a ...
30
votes
1answer
2k views

Magic: the Gathering Combat Golf

Magic: the Gathering is a trading card game where, among other things, players play cards representing creatures, which can then attack the other player, or defend against the other player's attacks ...
8
votes
5answers
1k views

Let's play Hangman?

According to this page, the best strategy to guess English hangman words is to calculate the odds of each letter in a word list that meet our conditions. But, as I'm really lazy, I don't really want ...
9
votes
0answers
539 views

Take It or Leave It III: A Game Show for Computers

This is the third in a series of puzzles that I will be posting every Monday at Midnight PST, and the final variant of "Take It or Leave It". The first puzzle is located Here The second puzzle is ...
10
votes
2answers
972 views

ASCII Game of Pong

Ascii Pong The challenge is to recreate the classic game "pong" in ASCII characters in the shortest code possible. Requirements/specifications The "screen" should be 45x25 characters. White space ...
20
votes
7answers
3k views

Take It or Leave It II: A Game Show for Computers

This is the second in a series of puzzles that I will be posting every Monday at Midnight PST. The first puzzle is located Here. Context: A reclusive billionaire has created a game show to attract ...
28
votes
5answers
2k views

Take It or Leave It: A Game Show for Computers

Context: A reclusive billionaire has created a game show to attract the world's best and brightest programmers. On Mondays at the stroke of midnight, he chooses one person from a pool of applicants ...
4
votes
3answers
531 views

Avoid the Bullet Bills

In 2D Mario, Bullet Bill cannons are two units tall. The Bullet Bill is fired out of the upper unit and travels in a straight line (parallel to the x axis). Mario is two units tall when standing up ...
4
votes
0answers
558 views

“Talos Principle” Tetris Puzzle Generator [closed]

In Talos Principle, from time to time player has to solve a puzzle that looks like this: Source: http://uk.ign.com/wikis/the-talos-principle/File%3A20141108_134749.jpg This puzzle is already solved -...
12
votes
1answer
215 views

Check over hand values for single-suited Mahjong

Mahjong is a tile game that is immensely popular in Asia. It is typically played with four players, and the goal of the game is to be the first person to complete a valid hand using the tiles. In ...
18
votes
4answers
784 views

Roll my D&D character's ability scores

In Dungeons and Dragons, some of the most important atributes of a character are the ability scores. There are 6 ability scores, for the six abilities. The abilities are Strength, Dexterity, ...
21
votes
1answer
675 views

Automatic price-identification of scrolls in Nethack

OH GODS NO!! You can't leave us here with Doorknob! It'll be nethack everywhere! - 1d ago by Geobits Well, couldn't disappoint... Introduction (you can skip this section if you don't care about ...