Skip to content

Instantly share code, notes, and snippets.

Avatar

Neil Edwards neiled

View GitHub Profile
View min_spanning_tree
private void connectRooms(List<Room> rooms)
{
/*
Input: A non-empty connected weighted graph with vertices V and edges E (the weights can be negative).
Initialize: Vnew = {x}, where x is an arbitrary node (starting point) from V, Enew = {}
Repeat until Vnew = V:
Choose an edge {u, v} with minimal weight such that u is in Vnew and v is not
* (if there are multiple edges with the same weight, any of them may be picked)
Add v to Vnew, and {u, v} to Enew
Output: Vnew and Enew describe a minimal spanning tree
View add_doors
public void AddDoors(Level level)
{
for (int y = RoomStart.Y - 1; y <= RoomStart.Y + Height; y++)
{
for (int x = RoomStart.X-1; x <= RoomStart.X + Width; x ++)
{
if (y != RoomStart.Y - 1 && y != RoomStart.Y + Height && x != RoomStart.X - 1 && x != RoomStart.X + Width)
continue;
if (y < 0) continue;
View keybase.md

Keybase proof

I hereby claim:

  • I am neiled on github.
  • I am neiled (https://keybase.io/neiled) on keybase.
  • I have a public key whose fingerprint is 6A8E 50E5 EC89 2C66 18B1 FD19 8663 92CE 7C80 AAB5

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am neiled on github.
  • I am neiled (https://keybase.io/neiled) on keybase.
  • I have a public key whose fingerprint is B733 DCCB 65F0 0747 5F25 99CE B406 ABAE F9F3 8E18

To claim this, I am signing this object:

View gist:a46f9d89fecdeeacc619
Verifying I am +neiled on my passcard. https://onename.com/neiled
View gist:737305
abstract (1.0.0)
actionmailer (3.0.3)
actionpack (3.0.3)
activemodel (3.0.3)
activerecord (3.0.3)
activeresource (3.0.3)
activesupport (3.0.3)
arel (2.0.4)
bcrypt-ruby (2.1.2)
builder (3.0.0, 2.1.2)
@neiled
neiled / AUAT.txt
Created Jul 19, 2011
Automated User Acceptance Tests
View AUAT.txt
Contents:
Outside in development. BDD in .NET
Scenarios & Features
Automating acceptance testing -> BDD
-->Using MSTest
-->Using MSpec/SpecFlow
=========================================
@neiled
neiled / GivenSpecification.cs
Created Aug 2, 2011
GivenSpecification for Automated Acceptance Testing
View GivenSpecification.cs
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace IntegrationTestUtils
{
public abstract class GivenSpecification
{
public TestContext TestContext { get; set; }
/// <summary>
/// Steps that are run before each test.
View gist:1467580
Build 9 for DivaRemotingServer 1.0 (12.12.2011 14:05:00)
Action Group 5: Integration Tests
Action 1: Run MSTest tests on ~\_extracted\IntegrationTests\DivaRemoting.Tests.Integration.dll
Initializing Action...
Source and Target directory same; splitting.
RemoteAction Initialization Complete:
Temp Directory: C:\BuildMaster\_AGTTMP\_A7\_S0\TMP
Source Directory: C:\BuildMaster\_AGTTMP\_A7\_S0\SRC
Target Directory: C:\BuildMaster\_AGTTMP\_A7\_S0\WRK
Server: Build Server (Id: 8)
View req.json
{ socket:
{ _handle:
{ writeQueueSize: 0,
socket: [Circular],
onread: [Function: onread] },
_pendingWriteReqs: 0,
_flags: 0,
_connectQueueSize: 0,
destroyed: false,
errorEmitted: false,