Skip to content

Instantly share code, notes, and snippets.

View thecoshman's full-sized avatar
🤘
yeah!

thecoshman thecoshman

🤘
yeah!
View GitHub Profile
-module(numbergame).
-export([play/0]).
play() ->
intro(),
game_loop(get_int(), 666).
intro() ->
io:format("Welcome to this 'game'.~n"),
io:format("Enter numbers to narrow down onto what I am hard coded for~n"),
@thecoshman
thecoshman / game.md
Last active August 29, 2015 14:08 — forked from rmartinho/game.md

Lounge<Nomic>

Immutable Rules

101. All players must always abide by all the rules then in effect, in the form in which they are then in effect. The rules in the Initial Set are in effect whenever a game begins. The Initial Set consists of Rules 101-116 (immutable) and 201-213 (mutable).

102. Initially rules in the 100's are immutable and rules in the 200's are mutable. Rules subsequently enacted or transmuted (that is, changed from immutable to mutable or vice versa) may be immutable or mutable regardless of their numbers, and rules in the Initial Set may be transmuted regardless of their numbers.

103. A rule-change is any of the following:

package com.thecoshman;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
class Formater {
class Attribute{
String name;
Object value;
#include <vector>
#include <cmath>
#include <iostream>
#include <numeric>
template<typename T>
std::ostream& operator<<(std::ostream& os, const std::vector<T>& obj) {
os << "[";
for(uint i = 0; i < obj.size(); ++i){
os << obj.at(i);

Keybase proof

I hereby claim:

  • I am thecoshman on github.
  • I am thecoshman (https://keybase.io/thecoshman) on keybase.
  • I have a public key whose fingerprint is 0C17 FC93 5A44 439D 6968 A260 7ABC FDAF E26D 0FC1

To claim this, I am signing this object:

(function() {
var Game = window.Game = window.Game || {};
//
// Contrary to what 'gamescreen.js' says, this is the primary state holding class.
// It will handle all updates to the internal state of the game.
// No other code should try to modify state, it should be directed through this class
// This class should not think about anything else, such as rendering or input or networking
// It simply needs to ensure it stores a model of the game world as acurately as it possibly can.
//
@thecoshman
thecoshman / process.pl
Created February 8, 2017 20:33
A program I wrote in may 2013... I've no idea what I wanted it to do...
#!/usr/bin/perl
use warnings;
use strict;
sub load_file_data{
my $folder = 'unzipped';
opendir FOLDER, $folder;
my @files;
while (readdir FOLDER){
next if /^\.\.?$/;
@thecoshman
thecoshman / dcpu16.pl
Created March 4, 2017 12:20
Dcpu16 assembler thing
#!/bin/perl
use warnings;
use strict;
local %patterns = {
"hex" => "0[xX][\da-fA-F]+",
"comment" => "^\s*;",
"label" => ":(\w*)"
"opValue" => "\[?((0[xX][\da-fA-F]+)|([ABCXYZIJO])|(SP)|(PC)|(POP)|(PUSH)|(PEEK))(\+[ABCXYZIJ])?\]?",
class GameState constructor (val width:Int, val height:Int, turnOnLights:List<Pair<Int, Int>>){
var lights = BooleanArray(width * height)
init {
for(light in turnOnLights){
toggle(light.first, light.second)
}
}
override fun toString(): String{