Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 declaring a grid
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
JonnyBigBoi




PostPosted: Tue Dec 14, 2004 11:59 am   Post subject: declaring a grid

i need to make a grid on my game and im not sure how to use the function help me
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Tue Dec 14, 2004 12:01 pm   Post subject: (No subject)

what function are you talking about?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Delos




PostPosted: Tue Dec 14, 2004 12:34 pm   Post subject: (No subject)

Perhaps by 'grid' he means multidimensional array, and by 'functions' he means commands and routines...

if you want to set up a representation of a grid (2 dimensional), use an array.

E.g.
code:

var grid : array 1..10, 1..10 of int


Each box in the grid will then be a reference in the array, for example grid (1, 1) is the variable name for the first box in the first row...etc etc.

If each element in your grid is going to have more complex behaviours than simply storing a number, then you'll need to use types and records too.

Read these:
Records by Dodge
Arrays by tony
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: