Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. namespace MattEland.FSharpGeneticAlgorithm.ConsoleTestApp
  2.  
  3. open System
  4. open MattEland.FSharpGeneticAlgorithm.Logic.World
  5.  
  6. module Display =
  7.  
  8. let printCell char isLastCell =
  9. if isLastCell then
  10. printfn "%c" char
  11. else
  12. printf "%c" char
  13.  
  14. let displayWorld (world: World) =
  15. printfn ""
  16. for y in 1..world.MaxX do
  17. for x in 1..world.MaxY do
  18. let char = world.GetCharacterAtCell(x, y)
  19. printCell char (x = world.MaxX)
  20.  
  21. let getUserInput(): ConsoleKeyInfo =
  22. printfn ""
  23. printfn "Press R to regenerate or X to exit"
  24. Console.ReadKey(true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement