Conflicts:
	code/PtiClic/res/values/strings.xml
This commit is contained in:
John Charron 2011-01-31 18:20:36 +01:00
commit 1025b809ef
16 changed files with 599 additions and 162 deletions

View File

@ -3,5 +3,6 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="lib" path="lib/gson-1.6.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -12,9 +12,10 @@
</activity>
<activity android:name=".Preference" android:label="Préférence"></activity>
<activity android:name=".Info" android:label="Information"></activity>
<activity android:name=".Score" android:label="Score"></activity>
<activity android:name=".games.BaseGame"></activity>
<activity android:name=".Info" android:label="Information"></activity>
<activity android:name=".Score" android:label="Score"></activity>
</application>
</manifest>
</manifest>

Binary file not shown.

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/widget29"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:id="@+id/widget40"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" android:layout_weight="1">
<TextView android:id="@+id/mainWord" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="mainWord"
android:textSize="30sp" android:textStyle="bold" android:gravity="center">
</TextView>
<TextView android:id="@+id/currentWord" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="currentWord"
android:textStyle="bold" android:gravity="center">
</TextView>
</LinearLayout>
<LinearLayout android:id="@+id/widget44"
android:orientation="horizontal" android:layout_height="fill_parent" android:layout_width="fill_parent" android:layout_weight="9">
<Button android:id="@+id/relation1"
android:text="relation1" android:layout_height="wrap_content" android:layout_weight="1" android:layout_width="fill_parent" android:layout_gravity="bottom">
</Button>
<Button android:id="@+id/relation2"
android:text="relation2" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="1" android:layout_gravity="bottom">
</Button>
<Button android:id="@+id/relation3"
android:text="relation3" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="1" android:layout_gravity="bottom">
</Button>
<Button android:id="@+id/relation4"
android:text="relation4" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="1" android:layout_gravity="bottom">
</Button>
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
</LinearLayout>

View File

@ -11,16 +11,14 @@
android:id="@+id/RelativeLayout01" android:layout_width="wrap_content"
android:layout_gravity="bottom|center_horizontal">
<Button android:layout_height="wrap_content" android:id="@+id/games"
android:text="@string/games_name" android:layout_width="wrap_content"
<Button android:layout_height="wrap_content" android:text="@string/play_label" android:layout_width="wrap_content"
android:paddingLeft="60px" android:paddingRight="60px"
android:enabled="false" />
android:id="@+id/play"/>
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content" android:id="@+id/prefs"
android:text="@string/prefs_name" android:layout_below="@+id/games"
android:layout_alignLeft="@+id/games" android:layout_alignRight="@+id/games" />
android:text="@string/prefs_name" android:layout_below="@+id/play"
android:layout_alignLeft="@+id/play" android:layout_alignRight="@+id/play" />
<!-- A SUPPRIMER : -->
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content" android:id="@+id/voirscore"
@ -28,7 +26,6 @@
android:layout_alignLeft="@+id/prefs"
android:layout_alignRight="@+id/prefs" />
<!-- FIN A SUPPRIMER -->
</RelativeLayout>
<LinearLayout android:id="@+id/LinearLayout01"

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">PtiClic</string>
<string name="prefs_name">Préférences</string>
<string name="games_name">Jouer</string>

View File

@ -1,62 +0,0 @@
package model;
import java.util.Arrays;
public class GamePlayed {
private int id;
private String centre;
private String[] cloud;
private String[] category;
private static GamePlayed instance = null;
private GamePlayed(){
this.id = -1;
this.centre = "";
this.cloud = null;
this.category = null;
}
private GamePlayed(int id, String centre, String[] cloud, String[] category) {
this.id = id;
this.centre = centre;
this.cloud = cloud;
this.category = category;
}
public final static GamePlayed getInstance(){
if(instance == null) instance = new GamePlayed();
return instance;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getCentre() {
return centre;
}
public void setCentre(String centre) {
this.centre = centre;
}
public String[] getCloud() {
return cloud;
}
public void setCloud(String[] cloud) {
this.cloud = cloud;
}
public String[] getCategory() {
return category;
}
public void setCategory(String[] category) {
this.category = category;
}
@Override
public String toString() {
return "GamePlayed [id=" + id + ", centre=" + centre + ", cloud="
+ Arrays.toString(cloud) + ", category=" + category + "]";
}
}

View File

@ -1,9 +1,8 @@
package org.pticlic;
import org.pticlic.games.BaseGame;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
@ -11,42 +10,45 @@ import android.preference.PreferenceManager;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
public class Main extends Activity implements OnClickListener {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
((Button)findViewById(R.id.prefs)).setOnClickListener(this);
((Button)findViewById(R.id.voirscore)).setOnClickListener(this);
((ImageButton)findViewById(R.id.infoButton)).setOnClickListener(this);
// On récupère le nom du joueur des préférences.
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
String loginPref = sp.getString("login", "joueur");
// On l'ajoute dans le TextView prévu à cet effet
((TextView)findViewById(R.id.login)).setText("Login : " + loginPref);
}
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Écoute des clics sur les différents boutons
((Button)findViewById(R.id.prefs)).setOnClickListener(this);
((Button)findViewById(R.id.play)).setOnClickListener(this);
// On récupère le nom du joueur des préférences.
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
String loginPref = sp.getString("login", "joueur");
// On l'ajoute dans le TextView prévu à cet effet
((TextView)findViewById(R.id.login)).setText("Login : " + loginPref);
}
/* (non-Javadoc)
* @see android.view.View.OnClickListener#onClick(android.view.View)
*/
@Override
public void onClick(View v) {
if (v.getId()==R.id.prefs) {
startActivity(new Intent(this, Preference.class));
switch (v.getId()) {
case (R.id.prefs) : startActivity(new Intent(this, Preference.class)); break;
case (R.id.play) : startActivity(new Intent(this, BaseGame.class)); break;
}
if (v.getId()==R.id.voirscore){
// TODO: à supprimer
/*
Intent intent = new Intent(this, Score.class);
intent.putExtra("corrects", 10);
intent.putExtra("mauvais", 2);
intent.putExtra("manquants", 1.5);
intent.putExtra("total", 10); // WHERE??
startActivity(intent);
*/
}
}

View File

@ -0,0 +1,123 @@
package org.pticlic.games;
import org.pticlic.R;
import org.pticlic.model.Constant;
import org.pticlic.model.Game;
import org.pticlic.model.GamePlayed;
import org.pticlic.model.Network;
import org.pticlic.model.Network.Mode;
import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.Display;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.AlphaAnimation;
import android.view.animation.AnimationSet;
import android.view.animation.TranslateAnimation;
import android.widget.Button;
import android.widget.TextView;
public class BaseGame extends Activity implements OnClickListener {
private int currentWord = 0;
private int nbWord = 0;
private Game game;
private GamePlayed gamePlayed;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.game);
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
String serverURL = sp.getString(Constant.SERVER_URL, "http://serveur/pticlic.php");
Network network = new Network(serverURL, Mode.SIMPLE_GAME);
game = network.getGames(1);
int nbrel = game.getNbRelation();
nbWord = game.getNbWord();
gamePlayed = new GamePlayed();
gamePlayed.setGame(game);
// Boutons des relations
Button r1 = ((Button)findViewById(R.id.relation1));
Button r2 = ((Button)findViewById(R.id.relation2));
Button r3 = ((Button)findViewById(R.id.relation3));
Button r4 = ((Button)findViewById(R.id.relation4));
// Écoute des clics sur les relations
if (nbrel > 0) { r1.setOnClickListener(this); } else { r1.setVisibility(View.GONE); }
if (nbrel > 1) { r2.setOnClickListener(this); } else { r2.setVisibility(View.GONE); }
if (nbrel > 2) { r3.setOnClickListener(this); } else { r3.setVisibility(View.GONE); }
if (nbrel > 3) { r4.setOnClickListener(this); } else { r4.setVisibility(View.GONE); }
r1.setText("=");
r2.setText("Poubelle");
r3.setText("");
((TextView)findViewById(R.id.mainWord)).setText(Game.getName(game.getCentre()));
}
@Override
protected void onStart() {
super.onStart();
start();
}
private void arrivalView() {
//On recupere la largueur de l'ecran.
Display display = getWindowManager().getDefaultDisplay();
int width = display.getWidth();
//On recupere le centre de mainWord pour l'animation de translation.
TextView mainWord = (TextView)findViewById(R.id.mainWord);
// On defini un ensemble d'animation
AnimationSet set = new AnimationSet(true);
set.setFillAfter(true);
set.setDuration(1000);
TranslateAnimation translate = new TranslateAnimation(mainWord.getScrollX() / 2, mainWord.getScrollX() / 2, mainWord.getScrollY() / 2, width / 2);
translate.setDuration(1000);
set.addAnimation(translate);
AlphaAnimation alpha = new AlphaAnimation(.1f, 1);
alpha.setDuration(1000);
set.addAnimation(alpha);
// Que l'on rajoute a notre vue.
findViewById(R.id.currentWord).startAnimation(set);
}
private void start() {
((TextView)findViewById(R.id.currentWord)).setText(Game.getName(game.getWordInCloud(currentWord)));
arrivalView();
}
private void next() {
if (currentWord < nbWord) {
currentWord++;
start();
} else {
//TODO : Ajout l'envoie de GamePlayed a Score
}
}
/* (non-Javadoc)
* @see android.view.View.OnClickListener#onClick(android.view.View)
*/
@Override
public void onClick(View v) {
CharSequence currentWord = ((TextView)findViewById(R.id.currentWord)).getText();
switch (v.getId()) {
case (R.id.relation1) : gamePlayed.add(1, currentWord); next(); break;
case (R.id.relation2) : gamePlayed.add(2, currentWord); next(); break;
case (R.id.relation3) : gamePlayed.add(3, currentWord); next(); break;
case (R.id.relation4) : gamePlayed.add(4, currentWord); next(); break;
}
}
}

View File

@ -0,0 +1,5 @@
package org.pticlic.model;
public class Constant {
public static final String SERVER_URL = "SERVER_URL";
}

View File

@ -0,0 +1,128 @@
package org.pticlic.model;
public class Game {
public static class Word {
private int id;
private String name;
public Word() {}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
private int id;
private int cat1;
private int cat2;
private int cat3;
private int cat4;
private Word center;
private Game.Word[] cloud;
public Game() {
cloud = new Game.Word[3];
}
public int getNbRelation() {
int res = 0;
if (cat1 != -1) {
res++;
}
if (cat2 != -1) {
res++;
}
if (cat3 != -1) {
res++;
}
if (cat4 != -1) {
res++;
}
return res;
}
public static String getName(Word word) {
return word.getName();
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getCat1() {
return cat1;
}
public void setCat1(int cat1) {
this.cat1 = cat1;
}
public int getCat2() {
return cat2;
}
public void setCat2(int cat2) {
this.cat2 = cat2;
}
public int getCat3() {
return cat3;
}
public void setCat3(int cat3) {
this.cat3 = cat3;
}
public int getCat4() {
return cat4;
}
public void setCat4(int cat4) {
this.cat4 = cat4;
}
public Word getCentre() {
return center;
}
public void setCentre(Word center) {
this.center = center;
}
public int getNbWord() {
return cloud.length;
}
public Game.Word getWordInCloud(int index) {
return cloud[index];
}
@Override
public String toString() {
return "Game [id=" + id + ", cat1=" + cat1 + ", cat2=" + cat2
+ ", cat3=" + cat3 + ", cat4=" + cat4 + ", center=" + center
+ ", cloud=" + cloud + "]";
}
}

View File

@ -0,0 +1,32 @@
package org.pticlic.model;
import java.util.ArrayList;
public class GamePlayed {
private ArrayList<CharSequence> relation1;
private ArrayList<CharSequence> relation2;
private ArrayList<CharSequence> relation3;
private ArrayList<CharSequence> relation4;
private Game game;
public GamePlayed() {
relation1 = new ArrayList<CharSequence>();
relation2 = new ArrayList<CharSequence>();
relation3 = new ArrayList<CharSequence>();
relation4 = new ArrayList<CharSequence>();
}
public void setGame(Game game) {
this.game = game;
}
public void add(int relation, CharSequence word) {
switch (relation) {
case 1: relation1.add(word); break;
case 2: relation2.add(word); break;
case 3: relation3.add(word); break;
case 4: relation4.add(word); break;
}
}
}

View File

@ -0,0 +1,73 @@
package org.pticlic.model;
import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;
import com.google.gson.Gson;
public class Network {
public enum Action {
GET_GAMES
}
public enum Mode {
SIMPLE_GAME("normal");
private final String value;
Mode(String value) {
this.value = value;
}
private String value() { return value; }
}
private Mode mode;
private String serverURL;
public Network(String serverURL, Mode mode) {
this.mode = mode;
this.serverURL = serverURL;
}
public Game getGames(int nbGames) {
try {
URL url = new URL(this.serverURL);
URLConnection connection = url.openConnection();
connection.addRequestProperty("action", "getparties");
connection.addRequestProperty("nb", String.valueOf(nbGames));
connection.addRequestProperty("mode", mode.value());
Gson gson = new Gson();
// JsonReader reader = new JsonReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
// Game game = gson.fromJson(reader, Game[].class);
// TODO : A enlever sert juste pour les tests
String json =
"{" +
" id: 1234," +
" cat1: 11," +
" cat2: 23," +
" cat3: -1," +
" cat4: -1, " +
" center: { id: 555, name: \"chat\" }, " +
" cloud: [" +
" { id: 123, name: \"souris\" }," +
" { id: 111, name: \"lait\" }," +
" { id: 345, name: \"machine à laver\" }" +
" ]" +
"}";
Game game = gson.fromJson(json, Game.class);
return game;
} catch (IOException e) {
return null;
}
}
public boolean sendGame(Game game) {
throw new UnsupportedOperationException();
}
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="PticClic" company="" webLink="pticlic.org" view-date="2011-01-03" view-index="0" gantt-divider-location="425" resource-divider-location="302" version="2.0">
<project name="PticClic" company="" webLink="pticlic.org" view-date="2011-01-10" view-index="0" gantt-divider-location="425" resource-divider-location="302" version="2.0">
<description/>
<view zooming-state="default:3" id="gantt-chart"/>
<view id="resource-table">
@ -36,7 +36,7 @@
<depend id="6" type="2" difference="0" hardness="Rubber"/>
</task>
<task id="1" name="Recherche de beta-testeurs" meeting="false" start="2011-01-15" duration="28" complete="10" priority="1" expand="true"/>
<task id="2" name="Iteration 1" meeting="false" start="2011-01-17" duration="27" complete="25" priority="1" expand="true">
<task id="2" name="Iteration 1" meeting="false" start="2011-01-17" duration="27" complete="35" priority="1" expand="true">
<depend id="16" type="2" difference="0" hardness="Rubber"/>
<depend id="17" type="2" difference="0" hardness="Rubber"/>
<depend id="18" type="2" difference="0" hardness="Rubber"/>
@ -50,13 +50,13 @@
<depend id="8" type="2" difference="0" hardness="Strong"/>
<depend id="9" type="2" difference="0" hardness="Strong"/>
</task>
<task id="7" name="Fenetre de score" meeting="false" start="2011-01-24" duration="7" complete="0" priority="1" expand="true">
<task id="7" name="Fenetre de score" meeting="false" start="2011-01-24" duration="7" complete="20" priority="1" expand="true">
<depend id="10" type="2" difference="0" hardness="Strong"/>
</task>
<task id="8" name="Reseau client Android" meeting="false" start="2011-01-24" duration="7" complete="0" priority="1" expand="true">
<task id="8" name="Reseau client Android" meeting="false" start="2011-01-24" duration="7" complete="30" priority="1" expand="true">
<depend id="10" type="2" difference="0" hardness="Strong"/>
</task>
<task id="9" name="Fenetre de jeu" meeting="false" start="2011-01-24" duration="7" complete="0" priority="1" expand="true">
<task id="9" name="Fenetre de jeu" meeting="false" start="2011-01-24" duration="7" complete="20" priority="1" expand="true">
<depend id="10" type="2" difference="0" hardness="Strong"/>
</task>
<task id="10" name="Intégration client &amp; serveur" meeting="false" start="2011-01-31" duration="1" complete="0" priority="1" expand="true">
@ -166,99 +166,99 @@
<resources>
<resource id="0" name="B. BRUN" function="Default:1" contacts="bertrand0brun@gmail.com" phone="+33 6 74 56 71 61"/>
<resource id="1" name="G. DUPERON" function="SoftwareDevelopment:2" contacts="jahvascriptmaniac@gmail.com" phone="+33 6 88 95 57 92"/>
<resource id="2" name="J. CHARRON" function="SoftwareDevelopment:2" contacts="charron.john@gmail.com" phone="+33 6 71 78 84 50"/>
<resource id="2" name="J. CHARRON" function="0" contacts="charron.john@gmail.com" phone="+33 6 71 78 84 50"/>
<resource id="3" name="Y. BONAVERO" function="SoftwareDevelopment:2" contacts="yoann.b87@voila.fr" phone="+33 6 45 48 34 89"/>
<resource id="4" name="Alpha-testeurs" function="SoftwareDevelopment:4" contacts="" phone=""/>
</resources>
<allocations>
<allocation task-id="0" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="0" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="0" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="0" resource-id="0" function="Default:1" responsible="false" load="100.0"/>
<allocation task-id="0" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="0" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="1" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="25.0"/>
<allocation task-id="1" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="25.0"/>
<allocation task-id="1" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="25.0"/>
<allocation task-id="1" resource-id="0" function="Default:1" responsible="false" load="25.0"/>
<allocation task-id="1" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="25.0"/>
<allocation task-id="1" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="25.0"/>
<allocation task-id="5" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="5" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="6" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="6" resource-id="0" function="Default:1" responsible="false" load="75.0"/>
<allocation task-id="6" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="7" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="8" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="8" resource-id="0" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="9" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="9" resource-id="0" function="Default:1" responsible="false" load="75.0"/>
<allocation task-id="9" resource-id="0" function="Default:1" responsible="false" load="25.0"/>
<allocation task-id="10" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="10" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="10" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="10" resource-id="0" function="Default:1" responsible="false" load="75.0"/>
<allocation task-id="10" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="10" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="11" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="11" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="11" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="11" resource-id="0" function="Default:1" responsible="false" load="75.0"/>
<allocation task-id="11" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="11" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="12" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="12" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="12" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="12" resource-id="0" function="Default:1" responsible="false" load="75.0"/>
<allocation task-id="12" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="12" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="14" resource-id="4" function="SoftwareDevelopment:4" responsible="false" load="100.0"/>
<allocation task-id="16" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="25.0"/>
<allocation task-id="17" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="17" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="17" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="18" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="75.0"/>
<allocation task-id="18" resource-id="0" function="Default:1" responsible="false" load="100.0"/>
<allocation task-id="19" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="19" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="19" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="19" resource-id="0" function="Default:1" responsible="false" load="50.0"/>
<allocation task-id="19" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="19" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="20" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="20" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="20" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="20" resource-id="0" function="Default:1" responsible="false" load="50.0"/>
<allocation task-id="20" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="20" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="21" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="21" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="21" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="21" resource-id="0" function="Default:1" responsible="false" load="100.0"/>
<allocation task-id="21" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="21" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="23" resource-id="4" function="SoftwareDevelopment:4" responsible="false" load="100.0"/>
<allocation task-id="25" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="25" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="26" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="25" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="26" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="26" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="27" resource-id="0" function="Default:1" responsible="false" load="100.0"/>
<allocation task-id="28" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="29" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="29" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="29" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="29" resource-id="0" function="Default:1" responsible="false" load="50.0"/>
<allocation task-id="29" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="29" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="30" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="30" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="30" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="30" resource-id="0" function="Default:1" responsible="false" load="50.0"/>
<allocation task-id="30" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="30" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="31" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="31" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="31" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="31" resource-id="0" function="Default:1" responsible="false" load="100.0"/>
<allocation task-id="31" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="31" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="32" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="25.0"/>
<allocation task-id="32" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="25.0"/>
<allocation task-id="32" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="25.0"/>
<allocation task-id="32" resource-id="0" function="Default:1" responsible="true" load="25.0"/>
<allocation task-id="32" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="25.0"/>
<allocation task-id="32" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="25.0"/>
<allocation task-id="33" resource-id="4" function="SoftwareDevelopment:4" responsible="false" load="100.0"/>
<allocation task-id="35" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="36" resource-id="0" function="Default:1" responsible="false" load="100.0"/>
<allocation task-id="37" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="37" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="38" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="37" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="38" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="38" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="39" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="39" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="39" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="39" resource-id="0" function="Default:1" responsible="false" load="50.0"/>
<allocation task-id="39" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="39" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="40" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="40" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="40" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="40" resource-id="0" function="Default:1" responsible="false" load="50.0"/>
<allocation task-id="40" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="40" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="50.0"/>
<allocation task-id="41" resource-id="1" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="41" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="41" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="41" resource-id="0" function="Default:1" responsible="false" load="100.0"/>
<allocation task-id="41" resource-id="3" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
<allocation task-id="41" resource-id="2" function="SoftwareDevelopment:2" responsible="false" load="100.0"/>
</allocations>
<vacations/>
<taskdisplaycolumns>
@ -269,4 +269,7 @@
<previous/>
<roles roleset-name="Default"/>
<roles roleset-name="SoftwareDevelopment"/>
<roles>
<role id="0" name="Responsable communication"/>
</roles>
</project>

View File

@ -5,6 +5,9 @@
\usepackage[utf8]{inputenc}
\usepackage{um2/um2}
\setlength{\parindent}{0pt}
\setlength{\parskip}{2ex}
\title{Rapport de TER\\---\\Reconception du jeu Pticlic sous Android}
\author{Yoann \textsc{Bonavero} \and Bertrand \textsc{Brun} \and John \textsc{Charron} \and Georges \textsc{Dupéron}}
@ -12,33 +15,121 @@
\maketitle
\tableofcontents
\newpage
\section{Difficultés rencontrées}
\subsection{Itération 1, semaine 1}
\pagestyle{empty}
\thispagestyle{empty}
\tableofcontents
\pagestyle{empty}
\thispagestyle{empty}
\newpage
\setcounter{page}{1}
\pagestyle{plain}
\section{Introduction}
PtiClic\footnote{http://pticlic.org} est un jeu qui a été conçu et développé par Matthieu Lafourcade et Virginie Zampa. Le jeu a été créé afin de faire des études sur le vocabulaire et la sémantique sur des sujets de divers horizons dans un contexte ludique et motivant. Un mot central apparait, un nuage de mots entoure le mot central et le joueur clique et dépose des mots du nuage dans des catégories proposé sous forme d'énoncés.
Par exemple, pour le mot central 'bicyclette', les mots 'pédale', 'piéton', 'pied', 'automobile', 'Sébastien Chabal', 'Lance Armstrong', 'pédalier', 'voiture', 'yeux', 'rapide', 'routier', 'maillot', 'pédaler', 'dopage', 'véhicule', 'musclé', 'nez', etc. sont proposé. Le joueur dépose ces mots dans les catégories "... est une partie de 'cycliste', "Un contraire de 'cycliste' est ...", "'cycliste' a un rapport avec ...", "Une caractéristique de 'cycliste' est ..." ou aucune de ces catégorie. Un score est obtenu en soustrayant les mots manquants et les mots incorrects des mots corrects.
Des linguistes et des informaticiens récupèrent les données liées aux parties jouées, ce qui leur permet de faire de la recherche dans leurs domaines respectifs.
Notre travail consiste à créer une version du PtiClic sous Android, une version modifiée du jeu adaptée pour téléphone mobile. Le sujet du TER définit clairement l'objectif de ce projet~:
\begin{quotation}
L'étude et le prototypage d'une version fonctionnant sur des Android semble est intéressante. En particulier on s'intéressera a deux aspects : * les contraintes imposées par l'environnement smartphone * le biais qu'imposent ces contraintes sur le jeu et les données récoltées. Il s'agira donc de modéliser une version adaptée aux smartphones et d'en implémenter un prototype fonctionnel.
\end{quotation}
Dans un premier temps, une version de base sera conçue et réalisée. Ensuite, des fonctionnalités supplémentaires seront ajouter. La démarche adoptée par notre groupe est une approche itérative. Les quatres livraisons vont d'une version de base vers des versions plus élaborées~: un joueur pourrait, entre autres, modifier ses préférences ou choisir son niveau. L'idée est aussi de rendre le jeu plus attirant afin d'accroître le nombre de sujets participant aux études liées au résultat des données extraits des parties jouées.
\subsection{Android}
Android est un système d'exploitation pour téléphone mobile basé sur le noyau Linux développé par Android Inc., racheté par Google en 2005. Google et d'autres membres du Open Handset Alliance ont par la suite contribué à son développement et le Android Open Source Project (AOSP) est chargé de la maintenance et l'évolution d'Android. Ce système d'exploitation est utilisé notamment dans des smartphones, appelé aussi ordiphones, 'terminaux de poche' ou 'téléphones intelligents', produits et distribués par un grand nombre de fabriquants de téléphones mobiles. Le nombre de téléphones mobiles intégrant le système d'exploitation d'Android a cru sensiblement récemment.
Un grand nombre de développeurs ont créés des applications pour étendre la fonctionnalité des téléphones sous Android et il y a aujourd'hui plus de 200 000 applications disponibles. Bien qu'Android Market est le magasin en ligne opéré par Google, il existe d'autres distributeurs d'applications Android. La majorité des applications sont écrites en Java, bien qu'il soit possible de développer des applications en Python, en Ruby et d'autres par le biais du Android Scripting Environment.
\section{Analyse de l'existant}
\section{Analyse des besoins}
\section{Conception}
TODO: UML, diagrammes de classes, Use cases, etc...
\section{Réalisation}
\subsection{Cahier des charges}
\subsubsection{Langages de programmation}
\subsubsection{Base de données}
\subsubsection{d'autres subsubsections?}
\subsection{Outils utilisés}
\subsubsection{Environnement intégré de développement~: Eclipse}
\subsubsection{Android Developper Toolkit (ADT) Plugin}
\subsubsection{Android Software Development Kit (SDK)}
\subsubsection{Gestionnaire de version~: GitHub}
\subsubsection{JUnit}
\subsubsection{d'autres subsubsections ?}
\section{Discussion}
\subsection{Difficultés rencontrées}
\subsubsection{Itération 1, semaine 1}
\begin{itemize}
\item Outil de création de diagrammes de GANTT (planner) est assez mauvais.
\item Lenteur de l'émulateur Android : impossible de travailler sur mon PC.% gd
\item Caractères non échappés dans le dump de la base.% gd
\end{itemize}
\section{Compte rendu des réunions}
\section{Conclusions}
\newpage
\section{Bibliographie}
\subsection{PtiClic}
PtiClic : a game for vocabulary assessment combining JeuxDeMots and LSA. In proc of CICLing (Conference on Intelligent text processing and Comptational Linguistics). Mexico : 1-7 mars 2009. (\url{http://www.cicling.org/2009/RCS-41/289-298.pdf})
\subsection{Linguistique}
Modelling, Detection and Exploitation of Lexical Functions for Analysis , ECTI Journal, 2007, Vol.2, No2, ISSN 1905-050X, pp 97-108. (\url{http://www.lirmm.fr/\%7Eschwab/Publications/SL_ECTI_journal.pdf})
Making people play for Lexical Acquisition. In Proc. SNLP 2007, 7th Symposium on Natural Language Processing. Pattaya, Thailande, 13-15 December 2007. (\url{http://www.lirmm.fr/~lafourcade/ML-biblio/SNLP07/MLF-snlp2007-v5.doc})
\subsection{Java}
Code Conventions for the Java Programming Language, Oracle, 1999. (\url{http://www.oracle.com/technetwork/java/codeconvtoc-136057.html, www.oracle.com/technetwork/java/codeconventions-150003.pdf})
\subsection{Android}
Android Developer, 2011. (\url{http://developer.android.com/})
\newpage
\appendix
\section{Annexe A}
\subsection{14 janvier 2010}
Outils :
\begin{itemize}
\item Langage Java
\item Eclipse (version la plus récente)
\item Plugin ADT (Android Developper Toolkit)
\item SDK Android
\item Github
\item LaTeX
\item JUnit peut-être
\end{itemize}
Durée du projet 4 mois (4 itérations de 4 semaines)
Conventions de code : http://java.sun.com/docs/codeconv/html/CodeConventions.doc6.html
Conventions de code : \url{http://java.sun.com/docs/codeconv/html/CodeConventions.doc6.html}
Code (noms de variables, etc.) en anglais, commentaires en français, javadoc en français.
@ -49,11 +140,7 @@ Utilisation d'une classe \verb!Constant!
Écran d'accueil du jeu : Image (splash), puis directement les icônes des modes de jeu + configuration, au lieu d'avoir un écran avec le logo et jouer/config, suivi du choix du mode de jeu.
\section{Deuxième section}
\section{Troisième section}
\newpage
\appendix
\section{Annexe A}
\section{Annexe B}
\end{document}