Skip to content

Commit

Permalink
Another extract method to finish dbad7a
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelgwelch committed Mar 22, 2012
1 parent 8f6ee03 commit 2990074
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion csharp/BrainmessShort/Main.cs
Expand Up @@ -38,9 +38,17 @@ void JumpBackward()
pc = program.FindMatch(pc - 1);
}

bool EndOfProgram
{
get
{
return (pc >= program.Length);
}
}

public void Run()
{
while(pc < program.Length)
while(!EndOfProgram)
{
char instruction = Fetch();
switch(instruction)
Expand Down

0 comments on commit 2990074

Please sign in to comment.