Skip to content

Commit

Permalink
Bye Hello World
Browse files Browse the repository at this point in the history
  • Loading branch information
acid-chicken committed Oct 20, 2018
1 parent 93f3529 commit cb4798f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion NewWave.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Expand Down
1 change: 1 addition & 0 deletions src/NewWave/NewWave.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<LangVersion>latest</LangVersion>
<RuntimeIdentifiers>linux-x64;osx-x64;win-x64</RuntimeIdentifiers>
</PropertyGroup>

Expand Down
25 changes: 23 additions & 2 deletions src/NewWave/Program.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
using System;
using System;
using System.Linq;

namespace AcidChicken.NewWave
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
#if CSHARP8
Random random = new ();
int step = default;
#else
var random = new Random();
var step = 0;
#endif
Span<char> message = stackalloc [] { '大', '石', '泉', 'す', 'き' };
do
{
var current = random.Next(message.Length);
Console.Write(message[current]);
if (current == step)
{
if (++step == message.Length)
break;
}
else
step = 0;
} while (true);
Console.WriteLine();
}
}
}

0 comments on commit cb4798f

Please sign in to comment.