Commit c67e4030 authored by Fournier Baptiste's avatar Fournier Baptiste

after uml generation

parent 4416739d
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>jeu2048</name>
<name>Jeu2048_java</name>
<comment></comment>
<projects>
</projects>
......
/**
*
*/
package control;
import game.Engine;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @author fournier_bap
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public class GameController {
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private Engine engine;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @param engine
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public GameController(Engine engine) {
// begin-user-code
this.engine = engine;
// end-user-code
}
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @return
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public int getNumberOfLines() {
// begin-user-code
return engine.ydimension;
// end-user-code
}
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @return
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public int getNumberOfColumns() {
// begin-user-code
return engine.xdimension;
// end-user-code
}
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @param l
* @param c
* @return
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public int getCellValue(int l, int c) {
// begin-user-code
return engine.getCellValue(l, c);
// end-user-code
}
}
\ No newline at end of file
/**
*
*/
package game;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @author fournier_bap
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public class Cell {
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public int value;
}
\ No newline at end of file
/**
*
*/
package game;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @author fournier_bap
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public class Engine {
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private Cell[][] cells = null;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public int xdimension;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public int ydimension;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @param gridDimension
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public Engine(int gridDimension) {
// begin-user-code
cells = new Cell[gridDimension][gridDimension];
xdimension = gridDimension;
ydimension = gridDimension;
// end-user-code
}
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @param l
* @param c
* @return
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public int getCellValue(int l, int c) {
// begin-user-code
return cells[l][c].value;
// end-user-code
}
}
\ No newline at end of file
/**
*
*/
package hmi;
import javax.swing.JPanel;
import java.util.Set;
import control.GameController;
import java.awt.Graphics;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @author fournier_bap
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public class GamePanel extends JPanel {
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private Set<GameWindow> gameWindow;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private GameController gameController;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public int gridDimension;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @param control
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public GamePanel(GameController control) {
// begin-user-code
// TODO Auto-generated constructor stub
// end-user-code
}
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @param graph
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void paint(Graphics graph) {
// begin-user-code
// TODO Auto-generated method stub
// end-user-code
}
}
\ No newline at end of file
/**
*
*/
package hmi;
import javax.swing.JFrame;
import java.awt.event.KeyListener;
import java.util.Set;
import control.GameController;
import java.awt.event.KeyEvent;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @author fournier_bap
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public class GameWindow extends JFrame implements KeyListener {
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private Set<GamePanel> gamePanel;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private GameController gameController;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public GamePanel frame;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @param control
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public GameWindow(GameController control) {
// begin-user-code
// TODO Auto-generated constructor stub
// end-user-code
}
/**
* (non-Javadoc)
* @see KeyListener#keyTyped(KeyEvent e)
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void keyTyped(KeyEvent e) {
// begin-user-code
// TODO Auto-generated method stub
// end-user-code
}
/**
* (non-Javadoc)
* @see KeyListener#keyPressed(KeyEvent e)
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void keyPressed(KeyEvent e) {
// begin-user-code
// TODO Auto-generated method stub
// end-user-code
}
/**
* (non-Javadoc)
* @see KeyListener#keyReleased(KeyEvent e)
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void keyReleased(KeyEvent e) {
// begin-user-code
// TODO Auto-generated method stub
// end-user-code
}
}
\ No newline at end of file
/**
*
*/
package jeu2048;
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @author fournier_bap
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public class Launcher {
/**
* <!-- begin-UML-doc -->
* <!-- end-UML-doc -->
* @param args
* @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void main(String... args) {
// begin-user-code
// TODO Auto-generated method stub
// end-user-code
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment