Computing: Free Pascal Programming

Programming Home   Home   Contact

Snake game (Snake2).

Description: GUI implementation of my old snake command line game. Usage of cursor keys to move the snake, which grows by eating meats (blue meats grow the snake by 1 element; cyan meats have no effect) and dies when hitting rocks (red). Use "New" in the "Game" menu of the main window to start the game. In the game window, push the "Start" button to start a round. All meats, including the cyan ones, must be eaten before you may pass to the next round (the sheat key CTRL+F12 allows you to skip eating cyan meats if all blue meats have been eaten). During snake movement, the "Pause" button pauses the game; press "Resume" to continue.

Free Pascal features: Catching keyboard events. Usage of timers. Usage of shapes' "Left" and "Top" properties to move them around on the screen; usage of their "Visible" property to dispaly them as needed. Complex Pascal data structures.


  Snake2a.jpg   Snake2b.jpg