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

Username:   Password: 
 RegisterRegister   
 2D Arrays Help?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
navalgazer




PostPosted: Tue May 19, 2015 3:26 pm   Post subject: 2D Arrays Help?

What is it you are trying to achieve?

So using an 2D array I'm trying to make a board game. When the user rolls ______ then the character token will transport to such spot.
So drawing the grid how would I refer to each spot as an array cell. So let's say I'm on space one and roll a six. How would I make the thing transport
to space 6.

Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
setscreen ("graphics:1000;1000")

for i : 1 .. 770 by 70
Draw.Line (0 + i, 0, 0 + i, 700, 7)
Draw.Line (0, 0 + i, 700, 0 + i, 7)
end for
Sponsor
Sponsor
Sponsor
sponsor
Raknarg




PostPosted: Tue May 19, 2015 3:49 pm   Post subject: RE:2D Arrays Help?

You'll have to be more specific on how your board works. Do you mean something like monopoly?
navalgazer




PostPosted: Tue May 19, 2015 7:01 pm   Post subject: RE:2D Arrays Help?

Essentially it's a game of snakes and ladder
navalgazer




PostPosted: Sat May 23, 2015 5:32 pm   Post subject: RE:2D Arrays Help?

So would anyone know how to give each box a position so that when I get a value for the dice, the token will move ___ amount of spaces?
Raknarg




PostPosted: Sat May 23, 2015 6:50 pm   Post subject: RE:2D Arrays Help?

pm me as a reminder, I'm at work right now.
navalgazer




PostPosted: Wed May 27, 2015 4:11 pm   Post subject: RE:2D Arrays Help?

pm~
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  [ 6 Posts ]
Jump to:   


Style:  
Search: