Ajout debut page regles
This commit is contained in:
parent
9b08b28846
commit
f267e9efc2
@ -25,6 +25,9 @@
|
|||||||
android:name="android.app.lib_name"
|
android:name="android.app.lib_name"
|
||||||
android:value="" />
|
android:value="" />
|
||||||
</activity>
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".RulesActivity"
|
||||||
|
android:exported="false"/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
@ -10,7 +10,7 @@ public class MainActivity extends Activity {
|
|||||||
private Button mHotSeat;
|
private Button mHotSeat;
|
||||||
private Button mORDI;
|
private Button mORDI;
|
||||||
private Button mSettings;
|
private Button mSettings;
|
||||||
//private Button mRules;
|
private Button mRules;
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@ -19,7 +19,7 @@ public class MainActivity extends Activity {
|
|||||||
mHotSeat = findViewById(R.id.HotSeat);
|
mHotSeat = findViewById(R.id.HotSeat);
|
||||||
mORDI = findViewById(R.id.ORDI);
|
mORDI = findViewById(R.id.ORDI);
|
||||||
mSettings = findViewById(R.id.Settings);
|
mSettings = findViewById(R.id.Settings);
|
||||||
//mRules = findViewById(R.id.Rules);
|
mRules = findViewById(R.id.Rules);
|
||||||
mHotSeat.setOnClickListener(new View.OnClickListener() {
|
mHotSeat.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
@ -43,12 +43,12 @@ public class MainActivity extends Activity {
|
|||||||
startActivity(settings);
|
startActivity(settings);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/*mTP4.setOnClickListener(new View.OnClickListener() {
|
mRules.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Intent rules = new Intent(MainActivity.this, TP4.class);
|
Intent rules = new Intent(MainActivity.this, RulesActivity.class);
|
||||||
startActivity(rules);
|
startActivity(rules);
|
||||||
}
|
}
|
||||||
});*/
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
14
app/src/main/java/com/example/mastermind/RulesActivity.java
Normal file
14
app/src/main/java/com/example/mastermind/RulesActivity.java
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package com.example.mastermind;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
public class RulesActivity extends Activity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle saveInstanceState) {
|
||||||
|
super.onCreate(saveInstanceState);
|
||||||
|
setContentView(R.layout.activity_rules);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
27
app/src/main/res/layout/activity_rules.xml
Normal file
27
app/src/main/res/layout/activity_rules.xml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/cardview_dark_background">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:autoSizeMaxTextSize="100dp"
|
||||||
|
android:autoSizeMinTextSize="10dp"
|
||||||
|
android:text="@string/title_rules_activity"
|
||||||
|
android:textColor="#eee"
|
||||||
|
android:textSize="40dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_below="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/general_rules"
|
||||||
|
android:textColor="#eee"
|
||||||
|
android:padding="5dp"/>
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
@ -1,6 +1,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">MasterMind</string>
|
<string name="app_name">MasterMind</string>
|
||||||
<string name="title_activity_settings">SettingsActivity</string>
|
<string name="title_activity_settings">SettingsActivity</string>
|
||||||
|
<string name="title_rules_activity">Règles</string>
|
||||||
|
|
||||||
<!-- Preference Titles -->
|
<!-- Preference Titles -->
|
||||||
<string name="header">Paramètres</string>
|
<string name="header">Paramètres</string>
|
||||||
@ -8,4 +9,13 @@
|
|||||||
<!-- Sync Preferences -->
|
<!-- Sync Preferences -->
|
||||||
<string name="pions_title">Autoriser les pions vides</string>
|
<string name="pions_title">Autoriser les pions vides</string>
|
||||||
<string name="summary">Cette fonctionnalité augmente la difficulté du jeu pour l\'attaquant</string>
|
<string name="summary">Cette fonctionnalité augmente la difficulté du jeu pour l\'attaquant</string>
|
||||||
|
|
||||||
|
<!-- Rules -->
|
||||||
|
<string name="general_rules">Le mastermind est un jeu qui se joue généralement à deux, un défenseur doit choisir un code couleur que l\'attaquant devra deviner.
|
||||||
|
Pour se faire, une fois le code choisi par le 1er joueur, le 2nd a 10 tentatives pour le retrouver, après chaque essai le défenseur évalue la proposition.
|
||||||
|
Avec des pions noirs il indique les couleurs bien placées, et avec des pions blancs des couleurs mal placées, s\'il ne place pas de pion c\'est que la couleur
|
||||||
|
de la proposition n\'est pas dans le code à trouver.</string>
|
||||||
|
<string name="rules_hotseat"></string>
|
||||||
|
<string name="rules_bot"></string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue
Block a user