Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created September 30, 2019 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IntegerMan/372f9b35a39cf45ead9019b63506a214 to your computer and use it in GitHub Desktop.
Save IntegerMan/372f9b35a39cf45ead9019b63506a214 to your computer and use it in GitHub Desktop.
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