2023-04-03 09:13:48 +02:00
|
|
|
package com.example.mastermind;
|
|
|
|
|
|
|
|
import android.app.Activity;
|
2023-04-03 12:38:17 +02:00
|
|
|
import android.content.Intent;
|
2023-04-03 09:13:48 +02:00
|
|
|
import android.os.Bundle;
|
2023-04-03 12:38:17 +02:00
|
|
|
import android.widget.Button;
|
|
|
|
import android.view.View;
|
2023-04-03 09:13:48 +02:00
|
|
|
|
|
|
|
public class MainActivity extends Activity {
|
2023-04-03 12:38:17 +02:00
|
|
|
private Button mHotSeat;
|
|
|
|
private Button mORDI;
|
|
|
|
private Button mSettings;
|
2023-04-07 16:12:04 +02:00
|
|
|
private Button mRules;
|
2023-04-03 09:13:48 +02:00
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
setContentView(R.layout.activity_main);
|
2023-04-03 12:38:17 +02:00
|
|
|
|
|
|
|
mHotSeat = findViewById(R.id.HotSeat);
|
|
|
|
mORDI = findViewById(R.id.ORDI);
|
|
|
|
mSettings = findViewById(R.id.Settings);
|
2023-04-07 16:12:04 +02:00
|
|
|
mRules = findViewById(R.id.Rules);
|
2023-04-03 19:42:09 +02:00
|
|
|
mHotSeat.setOnClickListener(new View.OnClickListener() {
|
2023-04-03 12:38:17 +02:00
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
2023-04-06 23:42:37 +02:00
|
|
|
Intent HotSeat = new Intent(MainActivity.this, HotSeatActivity.class);
|
|
|
|
HotSeat.putExtra("bot", false);
|
|
|
|
startActivity(HotSeat);
|
2023-04-03 12:38:17 +02:00
|
|
|
}
|
|
|
|
});
|
2023-04-06 23:42:37 +02:00
|
|
|
mORDI.setOnClickListener(new View.OnClickListener() {
|
2023-04-03 12:38:17 +02:00
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
2023-04-06 23:42:37 +02:00
|
|
|
Intent ordi = new Intent(MainActivity.this, HotSeatActivity.class);
|
|
|
|
ordi.putExtra("bot", true);
|
|
|
|
startActivity(ordi);
|
2023-04-03 12:38:17 +02:00
|
|
|
}
|
2023-04-06 23:42:37 +02:00
|
|
|
});
|
2023-04-03 15:39:44 +02:00
|
|
|
mSettings.setOnClickListener(new View.OnClickListener() {
|
2023-04-03 12:38:17 +02:00
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
2023-04-06 23:42:37 +02:00
|
|
|
Intent settings = new Intent(MainActivity.this, SettingsActivity.class);
|
|
|
|
startActivity(settings);
|
2023-04-03 12:38:17 +02:00
|
|
|
}
|
2023-04-03 15:39:44 +02:00
|
|
|
});
|
2023-04-07 16:12:04 +02:00
|
|
|
mRules.setOnClickListener(new View.OnClickListener() {
|
2023-04-03 12:38:17 +02:00
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
2023-04-07 16:12:04 +02:00
|
|
|
Intent rules = new Intent(MainActivity.this, RulesActivity.class);
|
2023-04-06 23:42:37 +02:00
|
|
|
startActivity(rules);
|
2023-04-03 12:38:17 +02:00
|
|
|
}
|
2023-04-07 16:12:04 +02:00
|
|
|
});
|
2023-04-03 09:13:48 +02:00
|
|
|
}
|
|
|
|
}
|