moved c# source files to 'src' directory
This commit is contained in:
parent
491494600d
commit
3c3b6b859c
8 changed files with 15 additions and 1 deletions
|
@ -25,7 +25,9 @@ namespace Dungeoneer {
|
||||||
Console.WriteLine($"{roll.Print}\n => {result}");
|
Console.WriteLine($"{roll.Print}\n => {result}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void New(IList<string> args) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,14 @@ namespace Dungeoneer.Lexing {
|
||||||
Count = int.Parse(match.Groups[1].Value);
|
Count = int.Parse(match.Groups[1].Value);
|
||||||
Sides = int.Parse(match.Groups[2].Value);
|
Sides = int.Parse(match.Groups[2].Value);
|
||||||
}
|
}
|
||||||
|
public DiceToken(string text) {
|
||||||
|
var match = Match(text);
|
||||||
|
if(match.Success) {
|
||||||
|
Count = int.Parse(match.Groups[1].Value);
|
||||||
|
Sides = int.Parse(match.Groups[2].Value);
|
||||||
|
} else
|
||||||
|
throw new Exception("fuck you");
|
||||||
|
}
|
||||||
|
|
||||||
private const string Style = "\x1b[34;1m";
|
private const string Style = "\x1b[34;1m";
|
||||||
private static readonly Regex Pattern = new Regex(@"(\d+)d(\d+)");
|
private static readonly Regex Pattern = new Regex(@"(\d+)d(\d+)");
|
|
@ -19,6 +19,7 @@ namespace Dungeoneer {
|
||||||
public static void Main() {
|
public static void Main() {
|
||||||
Console.WriteLine("Starting");
|
Console.WriteLine("Starting");
|
||||||
|
|
||||||
|
Scripting.Run("roll.py");
|
||||||
Scripting.Run("repl.py");
|
Scripting.Run("repl.py");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
using IronPython.Hosting;
|
using IronPython.Hosting;
|
||||||
using Microsoft.Scripting.Hosting;
|
using Microsoft.Scripting.Hosting;
|
||||||
|
|
||||||
|
@ -14,6 +16,7 @@ namespace Dungeoneer {
|
||||||
Scope = Engine.CreateScope();
|
Scope = Engine.CreateScope();
|
||||||
dynamic builtin = Engine.GetBuiltinModule();
|
dynamic builtin = Engine.GetBuiltinModule();
|
||||||
|
|
||||||
|
// set up imports
|
||||||
var paths = Engine.GetSearchPaths();
|
var paths = Engine.GetSearchPaths();
|
||||||
paths.Add("/usr/lib/python3.12/");
|
paths.Add("/usr/lib/python3.12/");
|
||||||
Engine.SetSearchPaths(paths);
|
Engine.SetSearchPaths(paths);
|
Reference in a new issue