Commits

Anonymous committed 636748b

show knight when on starting point

Comments (0)

Files changed (1)

   Sdlloader.load_image ("data/images/flag/flag_" ^ color ^ ".png")   
     
 let load_img_castle () = 
-  Sdlloader.load_image ("data/images/castle.png")   
+  Sdlloader.load_image ("data/images/castle2.png")   
 
 let load_img_knight () = 
   Sdlloader.load_image ("data/images/knight.png")   
   end
   
 let draw_bullet screen maze color (x, y) =
-  if Maze.get maze (x, y) = ' ' then
+  let tile = Maze.get maze (x, y) in 
+  if tile = ' ' then
     let img = load_img_bullet color in
-    draw_img_tile screen x y img  
+    draw_img_tile screen x y img
+  else if color <> "star" then
+    draw_tile screen x y tile color
+  
 
 let draw_knight screen maze (x, y) =
-  if Maze.get maze (x, y) = ' ' then
+  let tile = Maze.get maze (x, y) in 
+  if tile = ' ' || tile = '@' then
     let img = load_img_knight () in
     draw_img_tile screen x y img