Welcome to Dream.In.Code
Become a Java Expert!

Join 150,384 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,152 people online right now. Registration is fast and FREE... Join Now!




Assigning a base value to arrays

 
Reply to this topicStart new topic

Assigning a base value to arrays, I'm coding a sort of game grid, and I want to have every value fir

GlitchInTheSystem
24 Jan, 2008 - 10:41 PM
Post #1

New D.I.C Head
*

Joined: 21 Jan, 2008
Posts: 1

CODE
int gx = 0;
int gy = 0;
for(int c = 0; c!=100; c++) // Sets grid to all spaces
{
    if(gx == 9)
    {
        gx = 0;
        gy++;
    }
    Grid[gx][gy] = " ";
    Play[gx][gy] = " ";
}

User is offlineProfile CardPM
+Quote Post

Jayman
RE: Assigning A Base Value To Arrays
24 Jan, 2008 - 11:18 PM
Post #2

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,327



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
Use code.gif tags when posting your code.

Can you describe the problem that you are having?
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 04:42PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month