mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-09 16:06:08 +02:00
Make syntax more readable
This commit is contained in:
@@ -51,14 +51,14 @@ internal class PredefinedVariableStatements : StatementRuntimeInformation
|
||||
RuntimeInfo.CurrentLine = args.TrimEnd();
|
||||
}
|
||||
|
||||
[Statement("%rnd", SearchMode.Contains, SpaceAround.None, ConsoleColor.Blue, KeepStatementInArgs = true, Priority = Priority.Highest)]
|
||||
[Statement("%rand", SearchMode.Contains, SpaceAround.None, ConsoleColor.Blue, KeepStatementInArgs = true, Priority = Priority.Highest)]
|
||||
public void GetRandom(string args)
|
||||
{
|
||||
while (args.Contains("%rnd"))
|
||||
while (args.Contains("%rand"))
|
||||
{
|
||||
args = args.ReplaceFirstOccurrence("%rnd", random.Next(32767, int.MaxValue).ToString());
|
||||
args = args.ReplaceFirstOccurrence("%rand", random.Next(32767, int.MaxValue).ToString());
|
||||
}
|
||||
|
||||
RuntimeInfo.CurrentLine = args.TrimEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user