Skip to content

Instantly share code, notes, and snippets.

View mattbasta's full-sized avatar
🌭
Still writing JavaScript

Matt Basta mattbasta

🌭
Still writing JavaScript
View GitHub Profile
@mattbasta
mattbasta / tilegame.cpp
Created April 20, 2011 01:50
tilegame.cpp
#include <cstdlib>
#include <iostream>
#include <cmath>
using namespace std;
int checkCompletion(int pos[3][3]);
int dist(int num, int x, int y);
int bestTile(int tiles[3][3], int & x, int & y);
void printBoard(int tiles[3][3]);
@mattbasta
mattbasta / codegen.py
Created January 22, 2011 18:16
A module to "unparse" a Python AST tree.
# -*- coding: utf-8 -*-
"""
codegen
~~~~~~~
Extension to ast that allow ast -> python code generation.
:copyright: Copyright 2008 by Armin Ronacher.
:license: BSD.
"""