15 lines
431 B
Haskell
15 lines
431 B
Haskell
module Main where
|
|
|
|
import Lib
|
|
import System.Environment
|
|
import System.Random
|
|
|
|
main :: IO ()
|
|
main = do
|
|
args <- getArgs
|
|
let boardWidth = read (head args)
|
|
boardLength = read (args !! 1)
|
|
bombs = read (args !! 2)
|
|
generator <- newStdGen
|
|
putStrLn . printBoard . revealAll . createBoard boardWidth boardLength $
|
|
generateRandomCoordinates (boardWidth-1) (boardLength-1) bombs generator
|