Skip to content

Instantly share code, notes, and snippets.


Marco Alka minecrawler

View GitHub Profile
View BaseComponent.ts
export class BaseElement extends HTMLElement {
dirty: boolean = true;
root: ShadowRoot;
constructor(hideInternals: boolean = true) {
this.root = this.attachShadow({ mode: hideInternals ? 'closed' : 'open' });
const observer = new MutationObserver(() => {
View index.html
<!DOCTYPE html>
<meta charset="utf-8"/>
<title>loop over array</title>
<script src=""></script>
<script src="./suite.js"></script>
<h1>Open the console to view the results</h1>
minecrawler / main.cpp
Created Aug 8, 2017
Guess random number game
View main.cpp
#include <chrono>
#include <iostream>
#include <random>
#include <string>
using namespace std;
using namespace std::chrono;
int main() {
int playerGuess = 0;
minecrawler /
Created Mar 22, 2017
Simple Snake implemented on top of Amethyst
extern crate rand;
extern crate amethyst;
use amethyst::{Application, Event, State, Trans, VirtualKeyCode, WindowEvent};
use amethyst::asset_manager::AssetManager;
use amethyst::config::Element;
use amethyst::ecs::{World, Join, VecStorage, Component, RunArg, System, Entity};
use amethyst::ecs::components::{Mesh, LocalTransform, Texture, Transform, Renderable};
use amethyst::gfx_device::DisplayConfig;
You can’t perform that action at this time.