Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 25th, 2012, 04:18 AM
usman2 usman2 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 12 usman2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 2 m 47 sec
Reputation Power: 0
Help 2

i have created another main class, but in this class i have to add tiles onto a grid by order, starting with top left hand corner and down to row by row.

here is my code:

Code:
import java.util.Scanner;

/**
 *
 * @author usmanm2
 */
public class Main {
    static Scanner input;
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        input = new Scanner(System.in);
        int i, j;
        // TODO code application logic here
        EdgeMatch em = new EdgeMatch(5, 5, 10);
        //em.randomYesInstance();
        EdgeMatchSolution ems = new EdgeMatchSolution(em);
        
        EdgeMatchDisplay emd = new EdgeMatchDisplay(ems, 400, 400);
        emd.setVisible(true);
        
        input.next();
        ems.add(3, 3, 0);
        emd.repaint();
    }
    public static void addTiles(EdgeMatchSolution ems, int i, int j)
    {
        for(i = 0; i < 36; i++)
        {
            for (j = 0; j < 36; j++)
                System.out.println(ems);
        }
    }
}
when compiled it shows the empty grid.

Last edited by usman2 : December 26th, 2012 at 05:37 AM. Reason: wrap in code tags

Reply With Quote
  #2  
Old December 25th, 2012, 07:31 AM
NormR's Avatar
NormR NormR is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Aug 2010
Location: SW Missouri
Posts: 2,955 NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 2 h 53 m 34 sec
Reputation Power: 345
Please edit your post and wrap the code in code tags.
Where is the CovUni package defined? The code can't be tested without it.

Reply With Quote
  #3  
Old January 1st, 2013, 04:32 AM
usman2 usman2 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 12 usman2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 2 m 47 sec
Reputation Power: 0
Each threads belong to different tasks.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Help 2

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap