![PoGa 4DGL Скачать руководство пользователя страница 10](http://html1.mh-extra.com/html/poga/4dgl/4dgl_reference-manual_1570571010.webp)
Portable Game Console
PoGa-4DGL Reference Manual
3.3 Writing your second PoGa game
Start a new Program
Click on the ‘New’ Icon again, the file type should be ‘4DGL program’, since that’s what you created last
time, then click OK. The platform should be PoGa-Goldelox, since that’s what we selected last time.
We are going to write a computer version of the classic ’15 puzzle’, so lets start by including the color
definitions and adding some constants.
#inherit "4DGL_16bitColours.fnc"
#constant TileSX 32 // pixel width of each Slider
#constant TileSY 32 // pixel height of each Slider
#constant TileNX 4 // Number of Tiles in X direction
#constant TileNY 4 // Number of Tiles in Y direction
And some initialised global variables.
var chars[16] := ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P'] ;
var posn[16] := [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] ;
See the program snapshot below.
© 2011 4D Systems
www.4dsystems.com.au
Page 10 of 87