#!/usr/bin/perl
use strict; use warnings;

# Incomplete -- these arrays need filling
# Did some more 23 Nov 05 -- prb102

my $stations = [ # A random assortment.
#	'Mornington Crescent', # Should NOT be included, for the sake of fuck
	'Dollis Hill',
	'Cockfosters',
	'Chalk Farm',
	'Edgware',
	'Green Park',
	'Cannon Street',
	'Euston',
	'Kentish Town',
	'Heathrow Terminal 4',
	'Uxbridge',
	'Woodford',
	'New Cross Gate',
	'Becontree',
];
my $maneuvers = ['shunt', 'strile', 'traversal', 'walk',
	'national rail journey', 'anti-strile', 'hop', 'translocation',
	'teraport', 'perfectly-balanced anti-strile'];
my $tokens = [ # Sourced from Andy's handy reference at ~apl100/mc.html
	# Primary
	'brown', 'red', 'yellow', 'green', 'orange', 'pink', 'grey', 'indigo',
	'black', 'violet', 'blue', 'aqua', 'white', 'transparent', 'chromatic',
	# Secondary
	'platinum', 'gold', 'silver', 'bronze', 'pyrite', 'diamond', 'ruby',
	'emerald', 'sapphire', 'crystal',
	# Tertiary (common only)
	'carbonic', 'chartreuse', 'cream', 'magenta', 'navy', 'ochre', 'puce'
];
my $cards = ['rocombulus', 'stop'];

if ($#ARGV == -1 || $ARGV[0] =~ /help/) {
	print <<EOF;
Mornington Crescent script -- prb102 -- 15/02/2005
 Usage: morningtoncrescent (station|maneuver|token|card)
Selects a random station, maneuver, etc.
Designed for use in other scripts.
EOF
	exit 1;
}
my $possibilities;
if ($ARGV[0] eq 'station' ) { $possibilities = $stations;  }
if ($ARGV[0] eq 'maneuver') { $possibilities = $maneuvers; }
if ($ARGV[0] eq 'token'   ) { $possibilities = $tokens;    }
if ($ARGV[0] eq 'card'    ) { $possibilities = $cards;     }
if (!@$possibilities) { exec 'morningtoncrescent help'; }
print $possibilities->[rand(@{$possibilities})] . "\n";
exit 0;
