diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,29 @@
+Copyright (c) <2014>, <Akash Fulchand Jagdhane>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+
+    * Neither the name of the author nor the names of contributors
+    may be used to endorse or promote products derived from this
+    software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/README.txt b/README.txt
new file mode 100644
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,32 @@
+** How To install :
+
+1) go to the extracted directory "snake-game-1.0"
+
+2) on terminal , fire the following commands :
+      $ sudo runhaskell Setup.hs configure
+      $ sudo runhaskell Setup.hs build
+      $ sudo runhaskell Setup.hs install
+
+3) to check if the package is installed into ghci, do the following :
+      $ ghci
+      prelude> :module SnakeGame
+
+   If you will reach something like "prelude SnakeGame>" in haskell then you can say that the package is properly installed.
+
+4) well, game is ready to play now :
+
+** How to play :
+
+1) we have three modules : 
+		SnakeGame.Game
+		SnakeGame.Idle
+		SnakeGame.Keyboard
+
+2) last 2 modules are supporting modules where our concern is SnakeGame.Game. So we will load this module.
+
+3) Prelude> :module SnakeGame.Game 
+   Prelude SnakeGame.Game> startGame  
+
+4) A game will start with a fullscreen. By pressing any of the four arrow keys, snake will start running. By using arrow keys player will have to give the directions to the snake.
+
+  Note : Since snake is always hungry, it will be running always on the screen in the search of food.
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,4 @@
+#!/usr/bin/env runhaskell
+
+module  Main (main) where  { import  Distribution.Simple ;  main =
+defaultMain }
diff --git a/SnakeGame/Game.hs b/SnakeGame/Game.hs
new file mode 100644
--- /dev/null
+++ b/SnakeGame/Game.hs
@@ -0,0 +1,50 @@
+module SnakeGame.Game (startGame) where
+import Graphics.Rendering.OpenGL
+import Graphics.UI.GLUT
+import Data.IORef
+import SnakeGame.Keyboard
+import System.Random
+
+displayPoints :: [(GLfloat,GLfloat,GLfloat)] -> PrimitiveMode -> IO ()
+displayPoints points primitiveShape = do  
+  renderAs primitiveShape points
+  flush
+
+renderAs :: PrimitiveMode -> [(GLfloat, GLfloat, GLfloat)] -> IO ()
+renderAs figure ps = renderPrimitive figure $ makeVertexes ps  
+
+makeVertexes :: [(GLfloat, GLfloat, GLfloat)] -> IO ()
+makeVertexes = mapM_ (\ (x,y,z) -> vertex $ Vertex3 x y z)
+
+_STEP = 0.0001
+        
+_NEXT = [(read "0.0"::GLfloat,read "0.0"::GLfloat,read "0.0"::GLfloat)]
+
+_STEP1 = 98
+
+startGame :: IO ()
+startGame = do
+  (progName,_) <- getArgsAndInitialize
+  createWindow progName
+  radius <- newIORef [(read "0.0"::GLfloat,read "0.0"::GLfloat,read "0.0"::GLfloat)]
+  fullScreen
+  score <- newIORef 0
+  next <- newIORef _NEXT
+  step1 <- newIORef _STEP1
+  point <- newIORef (read "0.9000000000"::GLfloat,read "0.900000000"::GLfloat,read "0.0"::GLfloat)
+  displayCallback $= display radius point
+  keyboardMouseCallback $= Just (keyboard radius next step1 point score)
+  mainLoop
+    
+fun :: [(GLfloat, GLfloat, GLfloat)] -> IO ()    
+fun r = displayPoints r Points  
+  
+display :: (HasGetter g, HasGetter g1) => g [(GLfloat, GLfloat, GLfloat)] -> g1 (GLfloat, GLfloat, GLfloat) -> IO ()          
+display radius point = do  
+  clear [ColorBuffer]
+  pointSize $= 60
+  currentColor $= Color4 1 1 0 1
+  r <- get radius
+  p <- get point
+  displayPoints (r ++ [p]) Points
+  flush
diff --git a/SnakeGame/Idle.hs b/SnakeGame/Idle.hs
new file mode 100644
--- /dev/null
+++ b/SnakeGame/Idle.hs
@@ -0,0 +1,260 @@
+module SnakeGame.Idle(idleUp,idleDown,idleLeft,idleRight,makeGLfloat) where
+import Graphics.Rendering.OpenGL
+import Graphics.UI.GLUT
+import Data.IORef
+import System.Random
+
+makeExit :: (GLfloat,GLfloat,GLfloat) -> [(GLfloat,GLfloat,GLfloat)] -> Bool
+makeExit pt lst = or $ map (makePts pt) lst
+
+          
+finalFunPts :: [(GLfloat,GLfloat,GLfloat)] 
+               -> [(GLfloat,GLfloat,GLfloat)] 
+               -> [(GLfloat,GLfloat,GLfloat)]
+finalFunPts [] [] = []
+finalFunPts [] lst2 = []
+finalFunPts lst1 [] = []
+finalFunPts (e1:lst1) (e2:lst2) = (funPts e1 e2) : (finalFunPts lst1 lst2)
+
+makePts :: (GLfloat,GLfloat,GLfloat) -> (GLfloat,GLfloat,GLfloat) -> Bool
+makePts (x1,y1,z1) (x2,y2,z2) = if(((read x::GLfloat) <= 0.001) && ((read y::GLfloat) <= 0.001)) then True else False
+  where
+    x = if(head xl == '-') then (tail xl) else xl
+    y = if(head yl == '-') then (tail yl) else yl
+    xl = number (x1 - x2)   
+    yl = number (y1 - y2)
+      
+number :: GLfloat -> String
+number n = if(n < 0) then ("-" ++ (number (-n))) else(if(elem 'e' a) then f else (show n))
+  where
+    a = show n
+    n1 = takeWhile (/='e') a           
+    n2 = read (drop 1 $ dropWhile (/='e') a) :: Int
+    f = if(n2 < 0) then ((take len pos) ++ "." ++ (drop len pos)) else ((take (len+n2) neg) ++ "." ++ (drop (len+n2) neg)) 
+    pos = ((take (-n2) (repeat '0')) ++ (filter (/='.') n1)) 
+    neg = (filter (/='.') n1) ++ (take ((2 * n2) + n2) (repeat '0')) 
+    len = length $ takeWhile (/='.') n1
+    
+funPts :: (GLfloat,GLfloat,GLfloat) -> (GLfloat,GLfloat,GLfloat) -> (GLfloat,GLfloat,GLfloat) 
+funPts (x1,y1,z1) (x2,y2,z2) = if(x1 == x2) then (if(y1>y2) then (x1,y1-0.00001,z1) else (x1,y1+0.00001,z1)) else (if(y1 == y2) then (if(x1 > x2) then (x1-0.00001,y1,z1) else (x1+0.00001,y1,z1)) else(x1,y1,z1))
+
+makeGLfloat :: (Show a, Show a1, Show a2) => (a, a1, a2) -> (GLfloat, GLfloat, GLfloat)
+makeGLfloat (x,y,z) = (read (show x)::GLfloat,read (show y)::GLfloat,read (show z)::GLfloat)
+
+idleUp
+  :: (Num a, Num a1, Ord a1, Show a, HasSetter s2, HasSetter s,
+      HasSetter s1, HasSetter s3, HasSetter s4, HasGetter s2,
+      HasGetter s4, HasGetter s3, HasGetter s1, HasGetter s) =>
+     s3 [(GLfloat, GLfloat, GLfloat)]
+     -> s2 [(GLfloat, GLfloat, GLfloat)]
+     -> s4 a1
+     -> s1 (GLfloat, GLfloat, GLfloat)
+     -> s a
+     -> IO ()
+
+idleUp radius next step1 point score = do
+  r <- get next
+  s1 <- get step1
+  let (a,b,c) = head r
+  let [x,y,z,t] = r        
+  if(b>(1.0)) then next $= ([(a, read "-0.9"::GLfloat, c)] ++ (take ((length r)-1) r))  
+              else return ()
+  
+  r <- get radius
+  rr <- get next
+  let w = head r
+  let l = head rr    
+  let (a,b,c) = l    
+  aa <- get point    
+  let (px,py,pz) = aa
+  ss <- get score
+  let (rx,ry,rz) = last r
+  let (nx,ny,nz) = last rr    
+  if(makeExit w (tail r)) then do putStrLn ("score is:" ++ (show ss))
+                                  leaveMainLoop
+                          else return()
+    
+  if(makePts w aa) then do score $= ss + 1
+                           let x = getStdRandom $ randomR (read (show (-0.9))::GLfloat,read (show 0.9)::GLfloat)
+                           let y = getStdRandom $ randomR (read (show (-0.9))::GLfloat ,read (show 0.9)::GLfloat)
+                           x1 <- x    
+                           y1 <- y
+                           let a = number ((read (show x1))::GLfloat)
+                           let b = number ((read (show y1))::GLfloat)
+                           let p = if(head a == '-') then (take 4 a) else (take 3 a)
+                           let q = if(head b == '-') then (take 4 b) else (take 3 b)
+                           point $= (read p::GLfloat,read q::GLfloat,0.0)
+                           radius $= r ++ [(rx,ry-0.1,rz)]
+                           next $= rr ++ [(nx,ny-0.1,nz)] 
+                   else do return ()
+                        
+  if(s1 < 0) then do radius $= map makeGLfloat rr 
+                     next $= map makeGLfloat ([(a,b+0.1,c)] ++ (take ((length rr)-1) rr))
+                     step1 $= 98
+
+             else do radius $= finalFunPts r rr
+                     step1 $= s1 - 1
+  postRedisplay Nothing      
+
+idleDown
+  :: (Num a, Num a1, Ord a1, Show a, HasSetter s2, HasSetter s,
+      HasSetter s1, HasSetter s3, HasSetter s4, HasGetter s2,
+      HasGetter s4, HasGetter s3, HasGetter s1, HasGetter s) =>
+     s3 [(GLfloat, GLfloat, GLfloat)]
+     -> s2 [(GLfloat, GLfloat, GLfloat)]
+     -> s4 a1
+     -> s1 (GLfloat, GLfloat, GLfloat)
+     -> s a
+     -> IO ()
+
+idleDown radius next step1 point score = do
+  r <- get next
+  s1 <- get step1
+  let (a,b,c) = head r
+  let [x,y,z,t] = r    
+  if(b<(-1.0)) then next $= ([(a,read "0.9"::GLfloat,c)]  ++ (take ((length r)-1) r)) 
+              else return ()
+  
+  r <- get radius
+  rr <- get next
+  let w = head r    
+  let l = head rr    
+  let (a,b,c) = l    
+  aa <- get point    
+  let (px,py,pz) = aa
+  ss <- get score
+  let (rx,ry,rz) = last r
+  let (nx,ny,nz) = last rr    
+  if(makeExit w (tail r)) then do putStrLn ("score is:" ++ (show ss))
+                                  leaveMainLoop
+    else return()    
+  if(makePts w aa) then do score $= ss + 1
+                           let x = getStdRandom $ randomR (read (show (-0.9))::GLfloat,read (show 0.9)::GLfloat)
+                           let y = getStdRandom $ randomR (read (show (-0.9))::GLfloat ,read (show 0.9)::GLfloat)
+                           x1 <- x    
+                           y1 <- y
+                           let a = number ((read (show x1))::GLfloat)
+                           let b = number ((read (show y1))::GLfloat)
+                           let p = if(head a == '-') then (take 4 a) else (take 3 a)
+                           let q = if(head b == '-') then (take 4 b) else (take 3 b)
+                           point $= (read p::GLfloat,read q::GLfloat,0.0) 
+                           radius $= r ++ [(rx,ry+0.1,rz)]
+                           next $= rr ++ [(nx,ny+0.1,nz)] 
+                   else do return ()
+      
+  if(s1 < 0) then do radius $= map makeGLfloat rr 
+                     next $= map makeGLfloat ([(a,b-0.1,c)] ++ (take ((length rr)-1) rr))
+                     step1 $= 98
+
+                     else do radius $= finalFunPts r rr                         
+                             step1 $= s1 - 1
+  postRedisplay Nothing      
+  
+idleLeft
+  :: (Num a, Num a1, Ord a1, Show a, HasSetter s2, HasSetter s,
+      HasSetter s1, HasSetter s3, HasSetter s4, HasGetter s2,
+      HasGetter s4, HasGetter s3, HasGetter s1, HasGetter s) =>
+     s3 [(GLfloat, GLfloat, GLfloat)]
+     -> s2 [(GLfloat, GLfloat, GLfloat)]
+     -> s4 a1
+     -> s1 (GLfloat, GLfloat, GLfloat)
+     -> s a
+     -> IO ()
+
+idleLeft radius next step1 point score = do
+  r <- get next
+  s1 <- get step1
+  let (a,b,c) = head r
+  let [x,y,z,t] = r    
+  if(a<(-1.0)) then next $= ([(read "0.9"::GLfloat,b,c)]   ++ (take ((length r)-1) r)) 
+              else return ()
+  
+  r <- get radius
+  rr <- get next
+  let w = head r
+  let l = head rr    
+  let (a,b,c) = l    
+  aa <- get point    
+  let (px,py,pz) = aa
+  ss <- get score
+  let (rx,ry,rz) = last r
+  let (nx,ny,nz) = last rr    
+  if(makeExit w (tail r)) then do putStrLn ("score is:" ++ (show ss))
+                                  leaveMainLoop
+    else return()    
+  if(makePts w aa) then do score $= ss + 1
+                           let x = getStdRandom $ randomR (read (show (-0.9))::GLfloat,read (show 0.9)::GLfloat)
+                           let y = getStdRandom $ randomR (read (show (-0.9))::GLfloat ,read (show 0.9)::GLfloat)
+                           x1 <- x    
+                           y1 <- y
+                           let a = number ((read (show x1))::GLfloat)
+                           let b = number ((read (show y1))::GLfloat)
+                           let p = if(head a == '-') then (take 4 a) else (take 3 a)
+                           let q = if(head b == '-') then (take 4 b) else (take 3 b)
+                           point $= (read p::GLfloat,read q::GLfloat,0.0) 
+                           radius $= r ++ [(rx+0.1,ry,rz)]
+                           next $= rr ++ [(nx+0.1,ny,nz)] 
+                   else do return ()
+                   
+  if(s1 < 0) then do radius $= map makeGLfloat rr 
+                     next $= map makeGLfloat ([(a-0.1,b,c)]  ++ (take ((length rr)-1) rr))
+                     step1 $= 98
+
+                     else do radius $= finalFunPts r rr
+                             step1 $= s1 - 1  
+  postRedisplay Nothing        
+  
+idleRight
+  :: (Num a, Num a1, Ord a1, Show a, HasSetter s2, HasSetter s,
+      HasSetter s1, HasSetter s3, HasSetter s4, HasGetter s2,
+      HasGetter s4, HasGetter s3, HasGetter s1, HasGetter s) =>
+     s3 [(GLfloat, GLfloat, GLfloat)]
+     -> s2 [(GLfloat, GLfloat, GLfloat)]
+     -> s4 a1
+     -> s1 (GLfloat, GLfloat, GLfloat)
+     -> s a
+     -> IO ()
+
+idleRight radius next step1 point score = do
+  r <- get next
+  s1 <- get step1
+  let (a,b,c) = head r
+  let [x,y,z,t] = r    
+  if(a>(1.0)) then next $= ([(read "-0.9"::GLfloat,b,c)]    ++ (take ((length r)-1) r)) 
+              else return ()
+  
+  r <- get radius
+  rr <- get next
+  let w = head r
+  let l = head rr    
+  let (a,b,c) = l    
+  aa <- get point    
+  let (px,py,pz) = aa
+  ss <- get score
+  let (rx,ry,rz) = last r
+  let (nx,ny,nz) = last rr    
+  if(makeExit w (tail r)) then do putStrLn ("score is:" ++ (show ss))
+                                  leaveMainLoop
+    else return()    
+  if(makePts w aa) then do score $= ss + 1                           
+                           let x = getStdRandom $ randomR (read (show (-0.9))::GLfloat,read (show 0.9)::GLfloat)
+                           let y = getStdRandom $ randomR (read (show (-0.9))::GLfloat ,read (show 0.9)::GLfloat)
+                           x1 <- x    
+                           y1 <- y
+                           let a = number ((read (show x1))::GLfloat)
+                           let b = number ((read (show y1))::GLfloat)
+                           let p = if(head a == '-') then (take 4 a) else (take 3 a)
+                           let q = if(head b == '-') then (take 4 b) else (take 3 b)
+                           point $= (read p::GLfloat,read q::GLfloat,0.0) 
+                           radius $= r ++ [(rx-0.1,ry,rz)]
+                           next $= rr ++ [(nx-0.1,ny,nz)] 
+                   else do return ()
+                   
+  if(s1 < 0) then do radius $= map makeGLfloat rr 
+                     next $= map makeGLfloat ([(a+0.1,b,c)]   ++ (take ((length rr)-1) rr))
+                     step1 $= 98
+
+                     else do radius $= finalFunPts r rr
+                             step1 $= s1 - 1
+  postRedisplay Nothing        
+
diff --git a/SnakeGame/Keyboard.hs b/SnakeGame/Keyboard.hs
new file mode 100644
--- /dev/null
+++ b/SnakeGame/Keyboard.hs
@@ -0,0 +1,50 @@
+module SnakeGame.Keyboard (keyboard) where
+import SnakeGame.Idle
+import Graphics.Rendering.OpenGL
+import Graphics.UI.GLUT
+import System.Random
+
+keyboard
+  :: (Num a, Num a1, Ord a1, Show a, HasSetter s2, HasSetter s,
+      HasSetter s1, HasSetter s3, HasSetter s4, HasGetter s3,
+      HasGetter s2, HasGetter s4, HasGetter s1, HasGetter s) =>
+     s3 [(GLfloat, GLfloat, GLfloat)]
+     -> s2 [(GLfloat, GLfloat, GLfloat)]
+     -> s4 a1
+     -> s1 (GLfloat, GLfloat, GLfloat)
+     -> s a
+     -> Key
+     -> KeyState
+     -> t
+     -> t1
+     -> IO ()
+
+keyboard radius next step1 point score (SpecialKey KeyUp) Down _ _ = do  
+  r <- get radius  
+  let (a,b,c) = head r
+  next $= map makeGLfloat ([(a,b+0.1,c)] ++ (take ((length r)-1) r))  
+  idleCallback $= Just (idleUp radius next step1 point score)        
+  postRedisplay Nothing
+
+keyboard radius next step1 point score (SpecialKey KeyDown) Down _ _ = do  
+  r <- get radius  
+  let (a,b,c) = head r
+  next $= map makeGLfloat ([(a,b-0.1,c)] ++ (take ((length r)-1) r))    
+  idleCallback $= Just (idleDown radius next step1 point score)        
+  postRedisplay Nothing
+  
+keyboard radius next step1 point score (SpecialKey KeyLeft) Down _ _ = do  
+  r <- get radius  
+  let (a,b,c) = head r
+  next $= map makeGLfloat ([(a-0.1,b,c)] ++ (take ((length r)-1) r))    
+  idleCallback $= Just (idleLeft radius next step1 point score)        
+  postRedisplay Nothing  
+  
+keyboard radius next step1 point score (SpecialKey KeyRight) Down _ _ = do  
+  r <- get radius  
+  let (a,b,c) = head r
+  next $= map makeGLfloat ([(a+0.1,b,c)] ++ (take ((length r)-1) r))  
+  idleCallback $= Just (idleRight radius next step1 point score)        
+  postRedisplay Nothing  
+
+keyboard _ _ _ _ _ _ _ _ _ = return ()  
diff --git a/snake-game.cabal b/snake-game.cabal
new file mode 100644
--- /dev/null
+++ b/snake-game.cabal
@@ -0,0 +1,26 @@
+cabal-version: >= 1.2
+
+name: snake-game
+
+synopsis:
+  Snake Game Using OpenGL
+
+description:
+  This is a Snake Game where a BLIND YELLOW COMPUTER SNAKE is always hungry and runs all over the screen to swallow anything that comes in its ways, most of the times, YELLOW SQUARE BOXES (assuming its favorite food is inside each box). Whenever Snake eats 1 box, its length increases. 
+  Ofcourse, since snake is blind, player have to help the snake in providing proper directions so that snake will eat maximum boxes. 
+  The games finishes when Snake swallows itself(i.e. when player gives wrong directions to the snake).
+
+version: 1.0
+license: BSD3
+license-file: LICENSE
+maintainer: Akash Fulchand Jagdhane <akashjagdhane@gmail.com>
+author: Akash Fulchand Jagdhane <akashjagdhane@gmail.com>
+build-type: Simple
+category: Game
+extra-source-files: README.txt
+library
+  build-depends: base >=2 && < 4, GLUT, OpenGL , random 
+  exposed-modules:
+    SnakeGame.Game
+    SnakeGame.Idle
+    SnakeGame.Keyboard	
