Created
September 30, 2019 00:27
-
-
Save IntegerMan/372f9b35a39cf45ead9019b63506a214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MattEland.FSharpGeneticAlgorithm.ConsoleTestApp | |
open System | |
open MattEland.FSharpGeneticAlgorithm.Logic.World | |
module Display = | |
let printCell char isLastCell = | |
if isLastCell then | |
printfn "%c" char | |
else | |
printf "%c" char | |
let displayWorld (world: World) = | |
printfn "" | |
for y in 1..world.MaxX do | |
for x in 1..world.MaxY do | |
let char = world.GetCharacterAtCell(x, y) | |
printCell char (x = world.MaxX) | |
let getUserInput(): ConsoleKeyInfo = | |
printfn "" | |
printfn "Press R to regenerate or X to exit" | |
Console.ReadKey(true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment