Last updated 19 Sept 2000

Programmer's Nightmare Rules

from Jolly Games, 2000, Version 3.0


In Programmer's Nightmare, you are trying to take control of a program, or in the second version, create a program that you control, as it is built. Certain instructions in the program let you gain points or cause you to lose them, or shift control over certain instructions in the main program loop. The object of this game is to get 20 points, in which case you have won. If you reach zero points, you are out of the game. If you lose all your control tokens, you are also out of the game.


There are two ways to play this game, Version 1 is a bit easier to learn, since all the players get to see all the cards at the same time, but there is much more strategy. Still, we advise playing this version before trying the other. Version 2 is a bit faster and easier to play. My own preference, as game designer, is Version 1. In Version 1 you deal the entire program out and then players claim instructions. In Version 2, players build the program, instruction by instruction, from cards in a playing hand.

For Version 1, first remove all the following cards from the deck; the Break (3 of them), Run (4), Secret (2), and Insert (1). They are not used in this version of the game. These are "one-shot" cards used for Version 2.

A certain number of cards (which varies depending on the number of players) are dealt out in a circle in the middle of the table, so that the last card dealt connects to the first card dealt. Each player has a number of colored markers (Bits) with which they may "claim" a program instruction (a card). The players take turns placing a single colored marker on one card until all the players have run out of markers. No other actions are taken until all the Bits are played. Only one token may be put on each card at this time in the game. The PROGRAM COUNTER is placed next to the first card dealt, in the direction that the program goes (as dealt). It tracks the direction that the program runs, and which instruction (card) the program is currently executing.

	# of Players;  		 2    3    4    5    6
	# of Cards dealt;	14   18   18   18   21
	# of Bits per player;    6    5    4    3    3
Some cards will introduce new Bits into the game besides the ones you start with; if you run out, you can get no more.

Once all the players have played all their Bits, the sequence of cards is "run", like a computer program, starting with the first card played, performing each action on each card once, then proceeding to the next card (clockwise). Naturally, the player whose marker is on a card is the one that chooses whether or not the action on the card is performed. Some cards will refer back to other cards, thus creating the potential for infinite loops. Since the program is a giant loop, once you have run all the cards, the program starts all over again, and runs over and over until one player wins, or until it becomes obvious that no one can gain an obvious advantage. In such a case, reshuffle all the cards and deal again. The cards "program" will be run in a big loop as much as possible, but many of the cards will interfere with the main loop, creating little sub-loops and jumping around in the sequence.

For cards with multiple Bits on them (this occurs when certain instructions move Bits around in the program), that instruction is performed multiple times, starting with the player who first placed a bit there, and continuing with any other Bits in order of placement upon that instruction. Place the Bits such that the person who was there first is closest to the side with the Program Counter. The player who was there second places his Bit next to the first, the third player next to the second, and so on. It's possible for the first person to act on a card to destroy or replace the second person's Bit before he or she has a chance to act on that card. It's also possible for the first person to replace the card upon which the Bits are sitting before the second player can act, in which case the second player would have to use the new instruction on the new card.

Once all the cards and tokens are played, the "program" is run, looping over and over until one player reaches 20 points, or all the other players reach zero. As the Program Counter reaches each instruction, each player with a token on that instruction decides whether or not to execute the instruction. Each player starts with 10 points. If a single player reaches zero points, all his or her tokens are removed from the cards. Likewise, if that player loses all of his or her Bits before losing all their points, they are out of the game.

Any player whose card performs an infinitely long operation that does not include losing or gaining points may perform the loop action up to three times, then must pass the play to the next card. Otherwise, the action of losing or gaining points is performed an infinite number of times, either allowing you or another player to win, or forcing you or another player to drop out of the game. (note that this does not apply to Version 2, as it's possible to win merely by creating a loop with no one but yourself in it).


Each player chooses a color to play, and takes all the tokens for that color. Shuffle the deck (the Program Stack) and deal 4 cards (program instructions) to each player. Then, deal one face up in the middle of the table with the Program Counter next to it, pointing either up or down. The Program Counter keeps track of which direction the program is running, and where in the program you are.

All players start with 10 points, marked down on a sheet of paper. With the youngest player going first, players then take turns playing cards from their hands and drawing replacement cards from the Program Stack (the deck). Cards may be played above OR below the existing string of program instructions, all the cards ending up in a long row. Play rotates clockwise. As each player plays a card, he or she puts a token of their color (an "Ownership Bit") onto the card they play. If they play a PROGRAM ERROR card, they take a token (Bit) belonging to an opponent and put it on the card. Cards are played at the head of the program, or at the end, in a straight line of cards. The Program Counter is not moved while this happens, and the program instructions are not performed, or "Executed" as they are played, that occurs later. The players attempt to play instructions in such a way that, WHEN the program is run, they will gain points or new Ownership tokens, while their opponents lose them.

RUNNING a program; this occurs if any player plays a RUN card, which they play instead of an instruction on their turn. When a RUN card is played, the program starts running, starting at the current instruction at which the Program Counter is adjacent, in the direction that it is pointing. If there is no player Ownership Bit on the instruction, then you skip it and proceed to the next one in the program in the direction that the pointer is pointing. If there IS an Ownership Bit there, then the player who controls that color gets to decide whether to execute that Program Instruction or not. If he or she chooses not to execute the instruction, then that instruction is skipped and the Program Counter is moved to the next instruction. If that player chooses to execute it, he or she performs the instructions on the cards in any way allowed by those instructions. Thus, if the instruction says that they can move a Bit to an adjacent card, then you can choose any Bit, including your own, and move it from its current card to an adjacent card. Once the instruction has been executed, the Program Counter moves on to the next instruction.

When the Program Counter reaches the end of the row, it gets moved back to the beginning of the row, looping the ends of the Program together. Note that at the start of the game, if players have been playing new instructions at both the top and bottom of the program, then the Program Counter will begin, roughly, in the middle of the program. Since the program loops around from end to end, this isn't really the middle at all, or course, just a point in the program loop.

While a Program is running, no one may play a card, except for a BREAK.

If a program reaches 20 cards in length, then the program immediately starts running, and continues to run until there is a winner. No BREAKS may be used after 20 cards are played.

STOPPING A RUNNING PROGRAM WITH A BREAK; If someone plays a BREAK card on a running program, the program stops at the next unexecuted Program Instruction. No BREAK of any type can be used on a running program until at least one instruction is about to be executed a second time.

In addition to playing BREAK on a running program and then discarding it, a BREAK can also be played in the body of a program; then, when it comes up to be executed, the player that owns it may decide whether to stop the program or not. The danger here, of course, is that some other Program Instruction might remove your Bit from that card before you have a chance to execute the BREAK. After a BREAK is played, players once again take turns building onto the existing program, starting with the player who played the RUN.

The player that started the program running may verbally BREAK the program. Any other player may BREAK a program by spending 3 life-points without playing a card.

There are a few other cards in the Stack that aren't actually instructions that get placed in the body of the program, like RUN, which are labeled "ONE-SHOTS". You play them once, follow the instructions on them, then discard them. Some will cause you to play 2 cards during your turn, in which case you draw 2 at the end of your turn, always ending your turn with 4 cards in your hand.

As the program is run, players will gain or lose points and markers (Bits). If they get down to zero points or Bits, they lose, if they get up to 20 points, they win. If a loop is created such that only one player is in the loop, then that player wins.

When more than one player has a Bit on a single instruction, players execute the instruction in the order that their tokens were played there. Note that during the initial play of the cards there will only be one Bit per card, except for the very first card of the program which will have no Bit at all.

INCREMENTING AND DECREMENTING CARDS; Some instructions can change a number on a card, but ONLY numbers. The difference between a card that says " can remove 1 Bit..." or " can remove a Bit..." is that you can't increment the latter card, since it isn't a number. Numbers cannot go negative, but if you have a card that decrements a "1" by 2 points, then it only decrements the card to zero. Players may, optionally, try playing without this rule, but it will get even more confusing than it already is.


Here is a list of all the cards. You don't have to read these unless questions arise as to how cards interact during game play. They are defined in some detail here, while on the cards the explanations are quite brief. Keep in mind that it is OPTIONAL as to whether a player uses a program card's instruction or not; a REVERSE does not always have to reverse the program direction.

ACQUIRE; You gain 2 points. (3 cards)
BIT MAKER; place a new marker of any color except yours on any card. (this will most commonly be used with "PROGRAM ERROR"). (1 card).
BIT MOVER; Move any 1 marker from any card to an adjacent card. (2 cards)
BIT SWAPPER; Swap any 2 markers, but they may not the same color or on the same card. (1 card)
BREAK; Stops the program. This may be used as a one-shot, or be permanently built into the program, and is only used in Version 2. It may not be executed until an instruction in the loop is about to be performed a second time.(3 cards)
BUG; All players take 1 point of damage. Unlike Program Error, the owner of this instruction may decide whether or not to activate the BUG. (2 cards)
COPY; Execute the previous 2 instructions in order. This essentially replaces the "copy" action with those 2 commands, as though you had the instructions from those 2 cards written on this card with your Bit on it. These instructions might refer to other cards, which duplicate other cards. See example at the end of these rules. The Program Counter doesn't move while you are performing these 2 copied commands. If you copy a SUBROUTINE, you deal 2 new instructions for the COPY card's subroutine. If the COPY is later moved out of range of the SUBROUTINE card, then the COPY's subroutine is discarded. (2 cards)
DECREMENT; Permanently reduce a number on a card by "1". Use one of the "-1" counters to indicate this. If there is more than one number on a card, you choose which to change. (2 cards)
DEFEND; Lose 1 life-point, but avoid any damage from the next 2 executed cards. If players choose not to execute certain cards after DEFEND is used, then they do not count toward the 2 cards. Thus, if a SUBROUTINE is executed just after a DEFEND, then the SUB and its first sub-card are defended against. (1 card)
DELETE; Take 1 Bit of any color off of any 1 card. (1 card)
ERASE; Remove previous card from sequence. This, of course, might change depending on whether the program has reversed or not. (2 cards)
FLOATER; Move this card forward or backward 1 space in the sequence, then copy the next action. That is, it swaps places with a card adjacent to it. The Program Counter moves with it. (2 cards)
FUTURE; Perform next 2 actions in the sequence. This essentially replaces the "future" action with those 2 commands, as though the instructions from those 2 cards were written on this one card, with your marker on it. These instructions might refer to other cards, which duplicate other cards. See example at the end of these rules. The Program Counter does not move from the Future card while it is duplicating the next 2 cards. FUTURE acts very much like COPY where the SUBROUTINE is concerned. (2 cards)
GOTO; This sends the Program Counter 6 cards forward in the program, and then, once used, "locks" it to that instruction, that is, if that instruction moves around in the program, then the GOTO still jumps to it. If the instruction is removed or replaced, then the GOTO goes nowhere. The program continues to run in the same direction in which it was running (clockwise or counterclockwise). If GO TO is duplicated and used at the start of a FUTURE or COPY command, then the statement to which it is linked is the second command executed. If a GOTO is inside a SUBROUTINE, it jumps 6 cards forward in the main body of the program, after the SUBROUTINE card. (3 cards)
INCREMENT; Add +1 to any number on any card, except this one. Use one of the "+1" counters to indicate this. (2 cards)
INSERT; A "one-shot" card, discard after use. This lets you draw a card from the deck, look at it, and then place it anywhere in the program. Place your Bit color on it. (1 card)
MULTIPLIER; Each player who has any number of Bits here gets 1 new Bit. Put it on this card. This may seem useless at first, unless you happen to have a Bit Mover, too. (1 card)
OVERSIGHT; This is the only card that activates if no Bits are there, and does nothing if Bits are there. If it's empty when the Program Counter gets there, everyone loses a point. Any player with a Bit on it does not get a choice as to whether or not it is activated, it is automatic.(2 cards)
OVERWRITE; Change a color Bit on any 1 program instruction to your color Bit. This card (OVERWRITE) is used only once, then replaced with another random card from the deck. The color Bit on the replacement card remains the same as before. (2 cards)
POINTER; Redirect any damage done by the previous 2 cards to a player of your choice. If one of these cards is a SUBROUTINE, this includes the cards inside the SUB. (1 card)
POWER SURGE; All players with no Bits on this card lose 3 points. Players with a Bit here lose only 1 point. (2 cards)
PROGRAM ERROR; When claimed (Version 1) or played (Version 2), you get to take an opponent's Bit and put it here. When the Program Counter reaches this instruction, the player there does not have an option as to whether or not it executes, it does automatically, and he or she loses 1 point. If there is any Bit on this card, it activates. In Version 1 this bit does not come from the group of bits that the player has available to play, but from any extra available of the same color, and this must be done before your last bit is played. (3 cards)
REPLACE; Replace any card in the sequence. The Bit color on it remains the same. Increment or decrement tokens on the removed card are discarded. (1 card)
REVERSE PROGRAM; The program reverses, going back the opposite direction from whence it came. Note that if 2 players have tokens on this card, its possible for the second player to cancel out the REVERSE of the first player. (2 cards)
RUN; Only used in Version 2, when it's played, the program runs, and runs until a BREAK is played. Discard after use. Once the program is running, no other cards are played on the program. (4 cards)
SECRET; This is another one-shot, discard after use. Take a card from your hand and play it face down at either end of the program with your Bit on it. The first time the Program Counter reaches it, and the owner decides to use it, then it is turned face up. (2 cards)
SELF DESTRUCT; Causes 4 points of damage to 1 player, then you discard this card along with any Bits on it. If there are 2 or more Bits here, only the first Bit on the card gets to blow up. (1 card)
SEQUENCE MOD; Move 1 program instruction to any other location in the program. That, of course, includes this one. If you move this one, the Program Counter goes with it. (1 card)
SUBROUTINE ; Deal 2 cards to the side of the main loop the first time this card has the Program Counter pointing at it, but not again afterwards. These two cards remain in the game after play, but they are not part of the main loop. No Bits are put on them, but Subroutine performs both functions of the two cards. The first time you activate SUBROUTINE, you MUST perform both instructions, in sequence, but on subsequent times that the Program Counter comes to the SUBROUTINE, it's your choice whether to run it or not. If there are cards in the SUBROUTINE which move around cards within a program loop, such as FLOATER, these must remain in the SUBROUTINE. Cards which deal with the entire program, such as SEQUENCE MOD, may affect instructions in the main program sequence and in the SUBROUTINE. Cards in the SUBROUTINE which would seem to "reach out" of the SUB, such as COPY, FUTURE, SWAP INSTRUCTIONS, and POINTER, do not, they are limited to whatever cards are within the subroutine. GOTO is an exception to this. If an UPGRADE changes ownership inside the SUBROUTINE, then the new owner's bit appears on it, and he must execute it whenever the SUBROUTINE is executed. (2 cards)
SWAP INSTRUCTIONS; Swap the previous 2 cards with each other, OR swap the next 2 cards in the sequence with each other. If this is changed to a "3", then you can switch around 3 cards before or behind you, in any manner you wish. (1 card)
TIME DELAY; Get a "SKIP" token. This token may be saved for later use, assuming that the Program Counter activates this card, even if TIME DELAY is subsequently eliminated or if your Bit is subsequently removed from the card. This is, in essence, telling a player that he "loses his turn" for 1 card. You discard the SKIP token after use. It is possible to accumulate more than 1. (1 card)
UPGRADE; Choose a location in the program, draw a new card (if there are any left in the deck) and place it there. Then, change the color Bit on UPGRADE to the color of the player on your right. Then move your Bit to the newly placed card. If you COPY (or use FUTURE on) an UPGRADE, and it's the first of the 2 instructions, then the Bit on the COPY (or FUTURE) changes before the 2nd instruction is performed, and the new owner of COPY is forced to perform that instruction, since the COPY has already been activated. (1 card)
WORM; add a Bit of yours to any card, except this one. The first owner of that card, if any, performs the action on that card first when it is next activated. (1 card)
ZAP; You can cause 1 point of damage to another player. (3 cards)


GO TO (player 2)
FUTURE (player 1)
ACQUIRE (player 3)
DECREMENT (player 1)
OVERWRITE (no owner, first card played)
PROGRAM ERROR (player 2 put player 3's token on it when played)
BUG (player 3)
COPY (player 1)
INCREMENT (player 3)
For this example, we will assume that the first card dealt was OVERWRITE, so it has no marker (Bit) on it. Player 1 has decided to play a RUN on his turn. The program starts at OVERWRITE which does nothing because nobody owns it, then moves to PROGRAM ERROR, where player 3 loses a point (has 9). Then the program moves to BUG; player 3 has the option to make everyone lose a point if she wants to, which she does, and the score drops to 9 to 9 to 8 for players 1 ,2, and 3 respectively. Then, player 1 gets to decide whether to execute the COPY. He decides not to, since COPY becomes equal to the PROGRAM ERROR and BUG, in sequence, which would mean he'd lose 2 points if he activated the COPY. Player 2, here, has a lot of power with the next instruction in the sequence; if he reverses the program, then player 1's COPY will copy the reverse and the increment. He chooses not to REVERSE, since he doesn't want player 1 getting the INCREMENT ability next turn. Instead, player 3 does.

Now some very interesting strategy occurs. Player 3 sees that it is possible for player 2 to completely lock out players 1 and 3 from accomplishing anything more by using his GOTO next turn to jump to the BUG, not performing his own REVERSE, and letting player 3 increment anything she wants to no effect (except for BUG, which would kill them all, eventually), since none of the other instructions are being performed, but player 3 is holding a BREAK in her hand, which she decides she will play at first opportunity. In the meantime, she increments the ACQUIRE card, so that when it does activate, she gets 3 points instead of just 2.

The program then loops around to the GOTO, where player 2 has a chance to jump to the BUG statement. He does it, since he sees that the upcoming FUTURE and ACQUIRE will boost players 1 and 3 up by 3 points each, so he's hoping that one of them will eventually play a BREAK. Just before the BUG is activated, player 3 plays a BREAK to stop the program, since she sees that, even if she continues to INCREMENT the ACQUIRE every loop of the program, the FUTURE of player 1 will always occur first, meaning player 1 would almost certainly get 20 points before player 3. Also, the FUTURE could take advantage of the ACQUIRE, then DECREMENT it before player 3 ever had a chance to use it herself.

Once the BREAK is played, players start playing program instructions again, starting with the player who played the RUN card. Eventually someone will play another RUN, and the horror will start all over again.

Programmer's Nightmare is copyright 1998 and 2000, by;

Jolly Games
3236 Peacock Lane
Santa Maria, CA
Thanks to Dave Allsopp and his gang of merry Englishmen who helped playtest this game, Stephen Tavener, and many others who I am no doubt forgetting.