From the makers of A Virus Named TOM comes a prototype seen only on YouTube inspired by Magic: the Gathering, Dungeon Crawlers, and board games of yore.

Please email ctg@misfitsattic.com if you do not receive a confirmation email.

Instructions on How to Play

Known Issues & Release Notes

Subreddit

Stream of us all playing CTG last night :)

Thanks to all who came out!

Features you want to see in CTG?

Whoops! There was an error.
ErrorException
…/­app/­models/­Reddit.php65
Illuminate\Exception\Handler handleError
<#unknown>0
simplexml_load_file
…/­app/­models/­Reddit.php65
Reddit LoadXML
…/­app/­models/­Reddit.php25
Reddit Get
…/­app/­storage/­views/­988ef8d8d460afbafc83fe6b10133d3b12
include
…/­vendor/­laravel/­framework/­src/­Illuminate/­View/­Engines/­PhpEngine.php38
Illuminate\View\Engines\PhpEngine evaluatePath
…/­vendor/­laravel/­framework/­src/­Illuminate/­View/­Engines/­CompilerEngine.php45
Illuminate\View\Engines\CompilerEngine get
…/­vendor/­laravel/­framework/­src/­Illuminate/­View/­View.php100
Illuminate\View\View getContents
…/­vendor/­laravel/­framework/­src/­Illuminate/­View/­View.php81
Illuminate\View\View render
…/­app/­storage/­views/­b5cf94884060ac9c47ca3dcd262e587518
include
…/­vendor/­laravel/­framework/­src/­Illuminate/­View/­Engines/­PhpEngine.php38
Illuminate\View\Engines\PhpEngine evaluatePath
…/­vendor/­laravel/­framework/­src/­Illuminate/­View/­Engines/­CompilerEngine.php45
Illuminate\View\Engines\CompilerEngine get
…/­vendor/­laravel/­framework/­src/­Illuminate/­View/­View.php100
Illuminate\View\View getContents
…/­vendor/­laravel/­framework/­src/­Illuminate/­View/­View.php81
Illuminate\View\View render
…/­vendor/­laravel/­framework/­src/­Illuminate/­Http/­Response.php69
Illuminate\Http\Response setContent
…/­vendor/­symfony/­http-foundation/­Symfony/­Component/­HttpFoundation/­Response.php141
Symfony\Component\HttpFoundation\Response __construct
…/­vendor/­laravel/­framework/­src/­Illuminate/­Routing/­Router.php1334
Illuminate\Routing\Router prepare
…/­vendor/­laravel/­framework/­src/­Illuminate/­Routing/­Controllers/­Controller.php156
Illuminate\Routing\Controllers\Controller processResponse
…/­vendor/­laravel/­framework/­src/­Illuminate/­Routing/­Controllers/­Controller.php126
Illuminate\Routing\Controllers\Controller callAction
…/­vendor/­laravel/­framework/­src/­Illuminate/­Routing/­Router.php938
Illuminate\Routing\{closure}
<#unknown>0
call_user_func_array
…/­vendor/­laravel/­framework/­src/­Illuminate/­Routing/­Route.php80
Illuminate\Routing\Route callCallable
…/­vendor/­laravel/­framework/­src/­Illuminate/­Routing/­Route.php47
Illuminate\Routing\Route run
…/­vendor/­laravel/­framework/­src/­Illuminate/­Routing/­Router.php969
Illuminate\Routing\Router dispatch
…/­vendor/­laravel/­framework/­src/­Illuminate/­Foundation/­Application.php499
Illuminate\Foundation\Application dispatch
…/­vendor/­laravel/­framework/­src/­Illuminate/­Foundation/­Application.php474
Illuminate\Foundation\Application run
…/­public/­index.php49

ErrorException

simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: /home/misfits_ctg/ctg.misfitsattic.com/app/models/reddit_cache/801e0c46df75ab1d361fa0c5e8a8fe612b91ab4f.xml:1: parser error : Document is empty

		if (isset($this->_Cache[$cacheFile])) {
			return $this->_Cache[$cacheFile];
		}

		/* Load file from cache */
		if (file_exists($this->getCacheDir() . $cacheFile)) {

			$this->_Cache[$cacheFile] = simplexml_load_file( $this->getCacheDir() . $cacheFile );

			$cacheLastModified = filemtime($this->getCacheDir() . $cacheFile);
<#unknown>
		if (isset($this->_Cache[$cacheFile])) {
			return $this->_Cache[$cacheFile];
		}

		/* Load file from cache */
		if (file_exists($this->getCacheDir() . $cacheFile)) {

			$this->_Cache[$cacheFile] = simplexml_load_file( $this->getCacheDir() . $cacheFile );

			$cacheLastModified = filemtime($this->getCacheDir() . $cacheFile);
	 */
	public function Get( $urlString, $offset = 0, $start = 0 ) {

		if (stripos($urlString, '.rss') === FALSE) {
			$urlString = $urlString . '.rss';
		}

		if (!$Xml = $this->LoadXML($urlString)) {
			return array();
		}
	<?php
		$Reddit = new Reddit();
		$Threads = $Reddit->Get('http://www.reddit.com/r/ChessTheGathering', 12);

		foreach($Threads as $Thread) {
			echo '<p class="thread-title"><a href="' . $Thread->link . '">' . $Thread->title . '</a></p>'; // pubDate

			$Comments = $Reddit->Get($Thread->link, -3, 1); // Last Comment
			foreach($Comments as $Comment) {
				echo '<p class="faded">' . $Comment->description . '</p>';
		extract($__data);

		// We'll evaluate the contents of the view inside a try/catch block so we can
		// flush out any stray output that might get out before an error occurs or
		// an exception is thrown. This prevents any partial views from leaking.
		try
		{
			include $__path;
		}
		catch (\Exception $e)
		if ($this->compiler->isExpired($path))
		{
			$this->compiler->compile($path);
		}

		$compiled = $this->compiler->getCompiledPath($path);

		return $this->evaluatePath($compiled, $data);
	}
	/**
	 * Get the evaluated contents of the view.
	 *
	 * @return string
	 */
	protected function getContents()
	{
		return $this->engine->get($this->path, $this->gatherData());
	}
		// We will keep track of the amount of views being rendered so we can flush
		// the section after the complete rendering operation is done. This will
		// clear out the sections for any separate views that may be rendered.
		$env->incrementRender();

		$env->callComposer($this);

		$contents = trim($this->getContents());

		// Once we've finished rendering the view, we'll decrement the render count
		<div class="large-4 columns">
			<?php echo $__env->make('home.introtext', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
		</div>
	</div>

	<div class="row">
		<div class="large-12 columns">
			<?php echo $__env->make('home.reddit', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
		</div>
	</div>
		extract($__data);

		// We'll evaluate the contents of the view inside a try/catch block so we can
		// flush out any stray output that might get out before an error occurs or
		// an exception is thrown. This prevents any partial views from leaking.
		try
		{
			include $__path;
		}
		catch (\Exception $e)
		if ($this->compiler->isExpired($path))
		{
			$this->compiler->compile($path);
		}

		$compiled = $this->compiler->getCompiledPath($path);

		return $this->evaluatePath($compiled, $data);
	}
	/**
	 * Get the evaluated contents of the view.
	 *
	 * @return string
	 */
	protected function getContents()
	{
		return $this->engine->get($this->path, $this->gatherData());
	}
		// We will keep track of the amount of views being rendered so we can flush
		// the section after the complete rendering operation is done. This will
		// clear out the sections for any separate views that may be rendered.
		$env->incrementRender();

		$env->callComposer($this);

		$contents = trim($this->getContents());

		// Once we've finished rendering the view, we'll decrement the render count
		}

		// If this content implements the "RenderableInterface", then we will call the
		// render method on the object so we will avoid any "__toString" exceptions
		// that might be thrown and have their errors obscured by PHP's handling.
		elseif ($content instanceof RenderableInterface)
		{
			$content = $content->render();
		}
     * @throws \InvalidArgumentException When the HTTP status code is not valid
     *
     * @api
     */
    public function __construct($content = '', $status = 200, $headers = array())
    {
        $this->headers = new ResponseHeaderBag($headers);
        $this->setContent($content);
        $this->setStatusCode($status);
        $this->setProtocolVersion('1.0');
	 *
	 * @param  mixed  $value
	 * @param  \Illuminate\Http\Request  $request
	 * @return \Symfony\Component\HttpFoundation\Response
	 */
	public function prepare($value, Request $request)
	{
		if ( ! $value instanceof SymfonyResponse) $value = new Response($value);

		return $value->prepare($request);
	protected function processResponse($router, $method, $response)
	{
		$request = $router->getRequest();

		// The after filters give the developers one last chance to do any last minute
		// processing on the response. The response has already been converted to a
		// full Response object and will also be handed off to the after filters.
		$response = $router->prepare($response, $request);

		$this->callAfterFilters($router, $method, $response);
		// used we will assume we want to just return the layout view as any nested
		// views were probably bound on this view during this controller actions.
		if (is_null($response) and ! is_null($this->layout))
		{
			$response = $this->layout;
		}

		return $this->processResponse($router, $method, $response);
	}
			// We will extract the passed in parameters off of the route object so we will
			// pass them off to the controller method as arguments. We will not get the
			// defaults so that the controllers will be able to use its own defaults.
			$args = array_values($route->getParametersWithoutDefaults());

			$instance = $ioc->make($controller);

			return $instance->callAction($ioc, $me, $method, $args);
		};
	}
<#unknown>
	 *
	 * @return mixed
	 */
	protected function callCallable()
	{
		$variables = array_values($this->getParametersWithoutDefaults());

		return call_user_func_array($this->getOption('_call'), $variables);
	}
		// We will only call the router callable if no "before" middlewares returned
		// a response. If they do, we will consider that the response to requests
		// so that the request "lifecycle" will be easily halted for filtering.
		$response = $this->callBeforeFilters($request);

		if ( ! isset($response))
		{
			$response = $this->callCallable();
		}
		// Once we have the route, we can just run it to get the responses, which will
		// always be instances of the Response class. Once we have the responses we
		// will execute the global "after" middlewares to finish off the request.
		else
		{
			$this->currentRoute = $route = $this->findRoute($request);

			$response = $route->run($request);
		}
		{
			$response = $this['events']->until('illuminate.app.down');

			return $this->prepareResponse($response, $request);
		}
		else
		{
			return $this['router']->dispatch($this->prepareRequest($request));
		}
	}
	/**
	 * Handles the given request and delivers the response.
	 *
	 * @return void
	 */
	public function run()
	{
		$response = $this->dispatch($this['request']);

		$this['router']->callCloseFilter($this['request'], $response);
| Once we have the application, we can simply call the run method,
| which will execute the request and send the response back to
| the client's browser allowing them to enjoy the creative
| and wonderful applications we have created for them.
|
*/

$app->run();

/*
Key Value
PATH /bin:/usr/bin:/sbin:/usr/sbin
RAILS_ENV production
FCGI_ROLE RESPONDER
REDIRECT_UNIQUE_ID U1KIP0PNHo0AAGNddQwAAAAE
REDIRECT_SCRIPT_URL /
REDIRECT_SCRIPT_URI http://ctg.misfitsattic.com/
REDIRECT_dsid 23239141
REDIRECT_ds_id_23239141
REDIRECT_DH_USER misfits_ctg
REDIRECT_STATUS 200
UNIQUE_ID U1KIP0PNHo0AAGNddQwAAAAE
SCRIPT_URL /
SCRIPT_URI http://ctg.misfitsattic.com/
dsid 23239141
ds_id_23239141
DH_USER misfits_ctg
HTTP_HOST ctg.misfitsattic.com
HTTP_ACCEPT_ENCODING x-gzip, gzip, deflate
HTTP_USER_AGENT CCBot/2.0 (http://commoncrawl.org/faq/)
HTTP_ACCEPT_LANGUAGE en-us,en-gb,en;q=0.7,*;q=0.3
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
SERVER_NAME ctg.misfitsattic.com
SERVER_ADDR 75.119.206.236
SERVER_PORT 80
REMOTE_ADDR 54.226.46.21
DOCUMENT_ROOT /home/misfits_ctg/ctg.misfitsattic.com/public
SERVER_ADMIN webmaster@ctg.misfitsattic.com
SCRIPT_FILENAME /home/misfits_ctg/ctg.misfitsattic.com/public/index.php
REMOTE_PORT 45358
REDIRECT_URL /
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.0
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /
SCRIPT_NAME /index.php
HTTP_CONNECTION close
PHP_SELF /index.php
REQUEST_TIME 1397917759
empty
empty
empty
empty
Key Value
_sf2_attributes Array ( [_token] => 9b5UQvRCRVXLuMa5x1LB3UCZuxVUP6ACSS7FK88Q )
_sf2_flashes Array ( )
_sf2_meta Array ( [u] => 1397917759 [c] => 1397917759 [l] => 7200 )
Key Value
PATH /bin:/usr/bin:/sbin:/usr/sbin
RAILS_ENV production
FCGI_ROLE RESPONDER
REDIRECT_UNIQUE_ID U1KIP0PNHo0AAGNddQwAAAAE
REDIRECT_SCRIPT_URL /
REDIRECT_SCRIPT_URI http://ctg.misfitsattic.com/
REDIRECT_dsid 23239141
REDIRECT_ds_id_23239141
REDIRECT_DH_USER misfits_ctg
REDIRECT_STATUS 200
UNIQUE_ID U1KIP0PNHo0AAGNddQwAAAAE
SCRIPT_URL /
SCRIPT_URI http://ctg.misfitsattic.com/
dsid 23239141
ds_id_23239141
DH_USER misfits_ctg
HTTP_HOST ctg.misfitsattic.com
HTTP_ACCEPT_ENCODING x-gzip, gzip, deflate
HTTP_USER_AGENT CCBot/2.0 (http://commoncrawl.org/faq/)
HTTP_ACCEPT_LANGUAGE en-us,en-gb,en;q=0.7,*;q=0.3
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
SERVER_NAME ctg.misfitsattic.com
SERVER_ADDR 75.119.206.236
SERVER_PORT 80
REMOTE_ADDR 54.226.46.21
DOCUMENT_ROOT /home/misfits_ctg/ctg.misfitsattic.com/public
SERVER_ADMIN webmaster@ctg.misfitsattic.com
SCRIPT_FILENAME /home/misfits_ctg/ctg.misfitsattic.com/public/index.php
REMOTE_PORT 45358
REDIRECT_URL /
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.0
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /
SCRIPT_NAME /index.php
HTTP_CONNECTION close
PHP_SELF /index.php
REQUEST_TIME 1397917759
0. Whoops\Handler\PrettyPageHandler