Skip to content

Instantly share code, notes, and snippets.

import errno
import os
import shutil
from pathlib import Path
from absl import app
from absl import flags
FLAGS = flags.FLAGS
@amitport
amitport / Solver.java
Created November 11, 2017 17:34
snake cube puzzle solver
import java.util.Stack;
public class Solver {
static boolean[][][] cube = new boolean[4][4][4];
static int[] segments = {3,1,2,1,1,3,1,2,1,2};
@amitport
amitport / War.coffee
Last active December 23, 2015 01:39
War
#wait until every player perform the "battle!" action
action 'Battle!', ->
#move the top card from each player down pile to battle pile
for p in [player, opponent]
p.down.top().flip()
p.down.moveTo(p.battle, 1)
#check if we have a war
while (pV=player.battle.top().value.rank) is (oV=opponent.battle.top().value.rank)
for p in [player, opponent]