Skip to content

Instantly share code, notes, and snippets.

View jakobbotsch's full-sized avatar

Jakob Botsch Nielsen jakobbotsch

View GitHub Profile
/*****************************************************************************/
// <BUGNUM> VSW 322033 <BUGNUM>
//
// This method calculates the USE and DEF values for a statement.
// It also calls fgSetRngChkTarget for the statement.
//
// We refactor out this code from fgPerBlockDataFlow
// and add QMARK logics to it.
//
// NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using System.Web;
using Newtonsoft.Json.Linq;
namespace GiveMeGold
{
public class CompositionTool implements Tool {
private final Game game;
private Tool actionTool;
private Tool endOfTurnTool;
private Tool setFocusTool;
private Tool unitMoveTool;
private ArrayList<Tool> childTools = new ArrayList<>();
public CompositionTool(DrawingEditor editor, Game game) {
this.game = game;
@jakobbotsch
jakobbotsch / Buffer.java
Created December 2, 2015 12:40
Buffer.java aflevering 5
import java.util.concurrent.Semaphore;
public class Buffer {
private final Semaphore readyForTake = new Semaphore(0);
private final Semaphore readyForFill = new Semaphore(1);
private String content;
public void addItem(String s) throws InterruptedException {
readyForFill.acquire();
"(((())))()((((((((())()(()))(()((((()(()(((()((()((()(()()()()()))(((()(()((((((((((())(()()((())()(((())))()(()(()((()(()))(()()()()((()((()(((()()(((((((()()())()((((()()(((((()(())()(())((())()()))()(((((((())(()())(()(((())(()))((())))(()((()())))()())((((())))(()(((((()(())(((()()((()((()((((((((((())(()())))))()))())()()((((()()()()()()((((((())())(((()())()((()()(((()()()))(((((()))(((()(()()()(()(()(((())()))(()(((()((())()(()())())))((()()()(()()(((()))(((()((((()(((((()()(()())((()())())(()((((((()(()()))((((()))))())((())()()((()(()))))((((((((()))(()()(((())())(())()((()()()()((()((()((()()(((())))(()((())()((((((((()((()(()()(((())())())))(())())))()((((()))))))())))()()))()())((()())()((()()()))(()()(((()(())((((())())((((((((()()()()())))()()()((((()()))))))()((((()(((()))(()()())))((()()(((()))()()())())(((())((()()(())()()()(((())))))()())((()))()))((())()()())()())()()(()))())))())()))(())((()(())))(()(())(()))))(()(())())(()(())(()(()))))((()())()))()((((()()))))())))()()())((())()((()()()