Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

One line text game.

Name: Anonymous 2011-10-28 4:48

(Declarations don't count as a line)

#include <iostream>

int main()
{
    int input = -1, location = 0;

    do {} while (
        (
            (
                (
                    (input != -1 && input != 2 && input != 4 && input != 6 && input != 8) ||
                    (input == 2 && ((location & 2) == 2)) ||
                    (input == 4 && ((location & 1) == 0)) ||
                    (input == 6 && ((location & 1) == 1)) ||
                    (input == 8 && ((location & 2) == 0))
                ) ? 0 * printf("Cannot move in this direction from this room.\r\n")
                  : 1 + ((input == -1) ? 0 * printf("== Super Text Adventure ==\r\n") : 0)
                      + 0 * (
                             location = (input == 8) ? (location & 1) :
                             ((input == 2) ? (location | 2) :
                             ((input == 4) ? (location & 2) :
                             ((input == 6) ? (location | 1) : location)))
                            )
            )
            ?
                0 * (
                        printf("---------\r\n| %c | %c |\r\n---------\r\n| %c | %c |\r\n---------\r\nYou are in room %d.\r\n%s\r\n",
                            location == 0 ? 'X':' ',
                            location == 1 ? 'X':' ',
                            location == 2 ? 'X':' ',
                            location == 3 ? 'X':'T',
                            location + 1,
                            location == 3 ? "You have found the treasure!  You win!\r\n" :
                                                                                "Which direction would you like to move?\r\n[8] North\r\n[4] "
                                                                                "West\r\n[2] South\r\n[6] East\r\n[0] Exit\r\n<===========>")
                    )
            :
                0
        ) || (
            (location == 3 ? 0 : (1 + 0 * scanf("%u", &input)))
            && input != 0
        )
    );
}

Name: Anonymous 2011-10-28 23:53

#!/usr/bin/env sh
/usr/games/nethack


I win.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List