Skip to content

Instantly share code, notes, and snippets.

View bhelyer's full-sized avatar

Bernard Helyer bhelyer

  • Auckland, New Zealand
View GitHub Profile
module main;
fn main() i32 {
return 0;
}
fn are!(T: i32)(surrounding: i32) bool {
if (surrounding != T) {
return false;
}
module rr.game.action.move;
import tile = rr.game.tile;
import action = rr.game.action.action;
import dungeon = rr.game.dungeon;
//! Try to move from one tile to another, fighting if appropriate.
class Move : action.Action {
this(start: tile.Tile*, end: tile.Tile*) {
mStartLocation = start;
module test;
import path = watt.path;
fn main() i32
{
path := "${path.pathSeparator}";
return 0;
}
//! Generator that works by placing predesigned rooms down at random.
module rr.game.generators.roomStitcher;
import io = [watt.io, watt.io.streams];
import rng = [watt.math.random, watt.io.seed];
import tile = rr.game.tile;
//! Generate a dungeon in the given blocks based out of externally defined 'rooms'.
fn generate(w: i32, h: i32, block: tile.Tile*[]) {
initialise();
// Copyright 2018, Bernard Helyer.
// SPDX-License-Identifier: BSL-1.0
/*!
* Handles emitting diagnostics to the client.
*
* This keeps track of the last kind of diagnostic we output, and makes
* sure that typing errors don't overwrite build errors etc.
*/
module vlsc.diagnostics;
module ol;
extern (Windows):
struct OVERLAPPED
{
private Blah: i32;
Internal: i32;
}
fn main() i32
{
root := getRoot();
foreach (elm; root.byKey("array").asArray) {
}
if (root.hasError) {
writeln(root.errorMessage);
return 1;
}
return 0;
module main;
fn foo() f32
{
return cast(f32)5 / 1 << 16;
}
fn main() i32
{
return 0;
module main;
import core.rt.thread;
import watt.io;
global workerMutex: vrt_mutex*;
global workQueue: Message[];
struct Message
{
Apr 19 22:43:38.537 INFO Starting: C:\Program Files (x86)\Microsoft VS Code\Code.exe, true
Apr 19 22:43:38.570 INFO Checking for running Code.exe processes... (attempt 1)
Apr 19 22:43:38.577 INFO Code.exe is running, wait a bit
Apr 19 22:43:39.080 INFO Checking for running Code.exe processes... (attempt 2)
Apr 19 22:43:39.088 INFO Code.exe is running, wait a bit
Apr 19 22:43:39.588 INFO Checking for running Code.exe processes... (attempt 3)
Apr 19 22:43:39.595 INFO Code.exe is running, wait a bit
Apr 19 22:43:40.095 INFO Checking for running Code.exe processes... (attempt 4)
Apr 19 22:43:40.103 INFO Code.exe is running, wait a bit
Apr 19 22:43:40.604 INFO Checking for running Code.exe processes... (attempt 5)