Haskell

ボールがうじゃうじゃ

画面内をボールが動き回るだけの、よくあるプログラムです。 module Main where import Graphics.HGL -- スクリーン情報 width::Int width = 320 height::Int height = 240 widthF::Float widthF = 320.0 heightF::Float heightF = 240.0 -- ボールオブジェ…

ウィンドウ表示

とりあえずウィンドウ表示です。 module Main where import Graphics.HGL.Window import Graphics.HGL.Run -- イベントハンドラ update w = do e <- getWindowEvent w case e of _ -> update w -- メイン main = runGraphics $ do win <- openWindowEx "Hell…