Krzysztof Mossakowski
Windows Programming
2006 - Tasks
Version A
Patient snakes
Description:
the application simulates behaviour of patient snakes
each snake moves either horizontally or vertically across the rectangular board
each snake has its own constant speed value and colour (speed values and colours may differ among all snakes)
snake extends its length by one field every ten moves it makes, although it cannot exceed a length limit defined in your application
snakes wrap around the edges of the board
whenever any snake tries to move on an occupied field it waits until that field becomes free
Controls:
'A' key - add a new snake (choose a speed value, colour and direction of movement and place it on a board). Initial length is equal to one field
'D' key - remove the most recently added snake
Technical requirements:
rectangular, nonresizable window representing a board with equal number of rows and columns
actual number of snakes displayed in the caption bar
two snakes can never occupy the same field at the same time
it is acceptible that horizontal snakes move only from left to right and vertical snakes from top to bottom
Approximate points:
window properties: 1.0
adding and removing snakes: 3.0
synchronization: 4.0
snake movement: 2.0