Package pdp.scrabble.ihm

Source Code of pdp.scrabble.ihm.RackTest

package pdp.scrabble.ihm;

import javax.swing.JFrame;

import pdp.scrabble.Factory;
import pdp.scrabble.game.Bag;
import pdp.scrabble.game.Rack;
import pdp.scrabble.game.impl.RackImplNew;

public class RackTest {

    /**
     * @param args
     */
    public static void main(String[] args) {
  Bag bag = Factory.FACTORY.createBag();
  bag.initWithLanguage("Francais");
  bag.fill();
  Rack r = new RackImplNew(bag);
  r.fill();
  RackView view = new RackView(r);
  RackController ctrl = new RackController(view);
  JFrame frame = new JFrame("test de Rack");
  frame.add(view);
  view.addMouseListener(ctrl);
  view.addMouseMotionListener(ctrl);
  frame.pack();
  frame.setVisible(true);
    }

}
TOP

Related Classes of pdp.scrabble.ihm.RackTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.