diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 13566b8..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Editor-based HTTP Client requests
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
diff --git a/.idea/CS105-Proje.iml b/.idea/CS105-Proje.iml
deleted file mode 100644
index d6ebd48..0000000
--- a/.idea/CS105-Proje.iml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/CS105-Projects.iml b/.idea/CS105-Projects.iml
new file mode 100644
index 0000000..0c6566e
--- /dev/null
+++ b/.idea/CS105-Projects.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 31e1ebc..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
index cc4c0d9..b30b4c8 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,7 +2,7 @@
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..d76f289
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ "lastFilter": {
+ "state": "OPEN",
+ "assignee": "MelekCetinel"
+ }
+}
+ {
+ "selectedUrlAndAccountId": {
+ "url": "https://github.com/AltEGE/CS105-Projects.git",
+ "accountId": "d39773c6-d642-4c52-88f8-f5fb265d4e6a"
+ }
+}
+
+
+
+ {
+ "customColor": "",
+ "associatedIndex": 6
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1734033527881
+
+
+
+ 1734033527881
+
+
+
+ 1734384650012
+
+
+ 1734384650012
+
+
+
+
+
+
+ 1734386439276
+
+
+
+ 1734386439276
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Abstract_Clothes.java b/Abstract_Clothes.java
deleted file mode 100644
index a2f4aa6..0000000
--- a/Abstract_Clothes.java
+++ /dev/null
@@ -1,24 +0,0 @@
-public abstract class Abstract_Clothes {
- protected double price;
- protected String color;
- protected int ID;
- protected String name;
-
- public int getID() {
- return ID;
- }
-
- public void setID(int ID) {
- this.ID = ID;
- }
-
- String getName() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
-
-
-
-
-
-}
diff --git a/Bank.java b/Bank.java
deleted file mode 100644
index 7f6f836..0000000
--- a/Bank.java
+++ /dev/null
@@ -1,37 +0,0 @@
-public class Bank {
- public static void main(String[] args) {
- int cipMiktari = 1000; // Başlangıç çip miktarı
- int[] coinFiyatlari = {50, 100, 150, 200, 250, 300, 350, 400, 450}; // Coin ücretleri
- int[] coinMiktarlari = {1, 2, 3, 4, 5, 6, 7, 8, 9}; // Coin miktarları
- boolean devam = true;
-
- while (devam) {// Menü
- System.out.println("\n--- Muz Cumhuriyeti ---");
- System.out.println("Cipiniz: " + cipMiktari);
- System.out.println("Coin İşlemleri:");
- for (int i = 0; i < coinFiyatlari.length; i++) {
- System.out.println((i + 1) + ". X Muz Coin - Fiyat: " + coinFiyatlari[i] + ", Miktar: " + coinMiktarlari[i]);
- }
- System.out.println((coinFiyatlari.length + 1) + ". Geri Dön");
- System.out.print("Seçiminizi yapınız: ");
-
- int secim = okuSecim();
-
- if (secim >= 1 && secim <= coinFiyatlari.length) {
- int fiyat = coinFiyatlari[secim - 1];
- int miktar = coinMiktarlari[secim - 1];
-
- if (cipMiktari >= fiyat) {
- cipMiktari -= fiyat;
- System.out.println("Başarıyla " + miktar + " adet X Muz Coin satın aldınız. Kalan Cipiniz: " + cipMiktari);
- } else {
- System.out.println("Yetersiz cip! Lütfen daha fazla cip yükleyin.");
- }
- } else if (secim == coinFiyatlari.length + 1) {
- System.out.println("Geri dönülüyor...");
- devam = false;
- } else {
- System.out.println("Geçersiz seçim! Tekrar deneyin.");
- }
- }
-}
diff --git a/Blackjack.java b/Blackjack.java
deleted file mode 100644
index bd4fd6a..0000000
--- a/Blackjack.java
+++ /dev/null
@@ -1,116 +0,0 @@
-import java.util.Scanner;
-
-public class Blackjack extends Game {
-
- private Deste deste1 = new Deste();
- private Scanner input = new Scanner(System.in);
-
- public Blackjack(double muz_coin) {
- super(muz_coin);
- }
-
- @Override
- public String kurallari_yaz() {
- return "Blackjack Kuralları:\n" +
- "- Amacınız, kartlarınızın toplam değeri 21'e en yakın olacak şekilde kupiyeri yenmektir.\n" +
- "- Kartların değeri: 2-10 arasındaki kartlar sayı değerinde, J/Q/K 10 puan ve A 1 veya 11 puan sayılır.\n" +
- "- İlk iki kart dağıtıldıktan sonra \"Hit\" (kart çek) veya \"Stand\" (kart çekmeyi bırak) seçebilirsiniz.\n" +
- "- Kupiyer 17 veya daha yüksek bir değere ulaşana kadar kart çeker.\n" +
- "- 21 yaparak kazanırsanız yatırdığınız paranın 2.5 katını kazanırsınız.\n";
- }
-
- @Override
- public void oyun_başlat() {
- System.out.println(kurallari_yaz());
- System.out.println("Oyun için deste karılıyor");
- deste1.desteKar();
- System.out.println("---------------------------------");
- System.out.println("Muz coin'iniz : " + getMuz_coin());
- System.out.println("---------------------------------");
-
- while (true) {
- System.out.print("\nKaç muz coin yatırmak istiyorsunuz? ");
- double yatirilanPara = input.nextDouble();
- input.nextLine(); // Boş satır temizliği
- para_yatir(yatirilanPara);
-
- deste1.kart_ver(deste1.getKullanıcı());
- deste1.kart_ver(deste1.getKullanıcı());
- deste1.kart_ver(deste1.getKupiyer());
- deste1.kart_ver(deste1.getKupiyer());
-
- deste1.Kartlatı_göster();
- deste1.kart_esitmi(deste1.getKullanıcı());
-
- if (deste1.isKartlar_esit()) {
- System.out.println("Kartlar eşit. Bölelim mi? (y)");
- String x = input.nextLine();
-
- if (x.equalsIgnoreCase("y")) {
- deste1.kart_ayır(deste1.getKullanıcı());
- deste1.Kartlatı_göster();
- para_yatir(yatirilanPara);
- super.blackjack = true;
- }
- }
-
- while (deste1.getKullanıcı_değer() < 21) {
- System.out.println("1. Hit (Kart Çek)\n2. Stand (Yeter)");
- int secim = input.nextInt();
- input.nextLine(); // Boş satır temizliği
-
- if (secim == 1) {
- deste1.kart_ver(deste1.getKullanıcı());
- deste1.hesaplaDeger();
- deste1.Kartlatı_göster();
-
- if (deste1.getKullanıcı_değer() > 21) {
- System.out.println("Bust! 21'i geçtiniz, kupiyer kazandı.");
- return;
- }
- } else if (secim == 2) {
- break;
- } else {
- System.out.println("Geçersiz seçim! Lütfen 1 veya 2 seçin.");
- }
- }
-
- deste1.hesaplaDeger();
- System.out.println("Kupiyerin Kartları Açılıyor:");
- deste1.SonKartlatı_göster();
-
- while (deste1.getKupiyer_değer() < 17) {
- deste1.kart_ver(deste1.getKupiyer());
- deste1.hesaplaDeger();
- deste1.SonKartlatı_göster();
- }
-
- if (deste1.getKullanıcı_değer() <= 21) {
- if (deste1.getKullanıcı_değer() == 21 && deste1.getKupiyer_değer() != 21) {
- System.out.println("21 yaptınız! Kazandınız.");
- win_blackjake(2.5);
- } else if (deste1.getKupiyer_değer() > 21 || deste1.getKullanıcı_değer() > deste1.getKupiyer_değer()) {
- System.out.println("Kazandınız!");
- win_blackjake(2);
- } else if (deste1.getKullanıcı_değer() == deste1.getKupiyer_değer()) {
- System.out.println("Berabere! Yatırdığınız para iade edildi.");
- draw();
- } else {
- System.out.println("Kupiyer kazandı!");
- }
- }
-
- System.out.print("\nÇıkmak için 'q' tuşuna basın, yeni oyun için herhangi bir tuşa basın: ");
- String devam = input.nextLine();
- if (devam.equalsIgnoreCase("q")) {
- System.out.println("Oyun sonlandırıldı.");
- break;
- }
-
- if (deste1.isYeterliKart()) {
- System.out.println("Deste karılıyor.");
- deste1.desteKar();
- }
- }
- }
-}
diff --git a/Deste.java b/Deste.java
deleted file mode 100644
index c84364a..0000000
--- a/Deste.java
+++ /dev/null
@@ -1,266 +0,0 @@
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Random;
-
-public class Deste {
-
- private ArrayList deste = new ArrayList<>();
- private ArrayList deste_karıl = new ArrayList<>();
- private ArrayList kullanıcı = new ArrayList<>();
- private ArrayList kullanıcı_ayrılmış = new ArrayList<>();
- private ArrayList kupiyer = new ArrayList<>();
- private int kullanıcı_değer;
- private int kullanıcı_ayrı;
- private int kupiyer_değer;
- private boolean yeterliKart;
- private String[] tipler = {"Karo", "Maça", "Sinek", "Kupa"};
- private String[] kartlar = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A"};
- private boolean kartlar_esit;
-
-
- // Constructor: Deste'yi oluştur ve doldur
- public Deste() {
-
- for (String tip : tipler) {
- for (String kart : kartlar) {
- deste.add(tip + " " + kart);
- }
- }
- }
-
- public void desteKar() {
- this.deste_karıl = new ArrayList<>(deste);
- Collections.shuffle(this.deste_karıl);
- this.yeterliKart = false;
- }
-
- public void hesaplaDeger() {
- this.kullanıcı_değer = hesaplaElDegeri(this.kullanıcı);
- this.kupiyer_değer = hesaplaElDegeri(this.kupiyer);
-
- if (!kullanıcı_ayrılmış.isEmpty()){
-
- this.kullanıcı_ayrı = hesaplaElDegeri(this.kullanıcı_ayrılmış);
- }
- }
-
- private int hesaplaElDegeri(ArrayList el) {
- int toplam = 0;
- int asSayisi = 0;
-
- for (String kart : el) {
- String kartDegeri = kart.split(" ")[1];
-
- if (kartDegeri.equals("J") || kartDegeri.equals("Q") || kartDegeri.equals("K")) {
- toplam += 10;
- } else if (kartDegeri.equals("A")) {
- asSayisi++;
- toplam += 11; // As'ı başlangıçta 11 olarak say
- } else {
- toplam += Integer.parseInt(kartDegeri);
- }
- }
-
- // Eğer toplam 21'i aşarsa, As'ların değerini 1 olarak say
- while (toplam > 21 && asSayisi > 0) {
- toplam -= 10; // Bir As'ı 11 yerine 1 olarak say
- asSayisi--;
- }
-
- return toplam;
- }
-
- public boolean isYeterliKart() {
- return this.yeterliKart;
- }
-
- public void kart_ver(ArrayList el) {
-
- Random rand = new Random();
- int index = rand.nextInt(deste_karıl.size());
- String kart = deste_karıl.remove(index);
- el.add(kart);
-
- if (deste_karıl.size() <= 12) {
- this.yeterliKart = true;
- }
- }
-
-
- public void kart_ayır(ArrayList el){
-
- String sonKart = el.get(el.size() - 1);
- String ikinciSonKart = el.get(el.size() - 2);
-
- String sonKartDegeri = sonKart.split(" ")[1];
- String ikinciSonKartDegeri = ikinciSonKart.split(" ")[1];
-
- if (sonKartDegeri.equals(ikinciSonKartDegeri)) {
- el.remove(el.size() - 1);
- String ara = el.get(el.size() - 1);
- kullanıcı_ayrılmış.add(ara);
- }
- }
-
- public void kart_esitmi(ArrayList el){
-
- String sonKart = el.get(el.size() - 1);
- String ikinciSonKart = el.get(el.size() - 2);
-
- String sonKartDegeri = sonKart.split(" ")[1];
- String ikinciSonKartDegeri = ikinciSonKart.split(" ")[1];
-
- if (sonKartDegeri.equals(ikinciSonKartDegeri)) {
-
- this.kartlar_esit = true;
- }
-
- else{
-
- this.kartlar_esit = false;
- }
-
- }
-
- public ArrayList getDeste() {
- return deste;
- }
-
- public void setDeste(ArrayList deste) {
- this.deste = deste;
- }
-
- public ArrayList getDeste_karıl() {
- return deste_karıl;
- }
-
- public void setDeste_karıl(ArrayList deste_karıl) {
- this.deste_karıl = deste_karıl;
- }
-
- public ArrayList getKullanıcı() {
- return kullanıcı;
- }
-
- public void setKullanıcı(ArrayList kullanıcı) {
- this.kullanıcı = kullanıcı;
- }
-
- public ArrayList getKullanıcı_ayrılmış() {
- return kullanıcı_ayrılmış;
- }
-
- public void setKullanıcı_ayrılmış(ArrayList kullanıcı_ayrılmış) {
- this.kullanıcı_ayrılmış = kullanıcı_ayrılmış;
- }
-
- public ArrayList getKupiyer() {
- return kupiyer;
- }
-
- public void setKupiyer(ArrayList kupiyer) {
- this.kupiyer = kupiyer;
- }
-
- public int getKullanıcı_değer() {
- return kullanıcı_değer;
- }
-
- public void setKullanıcı_değer(int kullanıcı_değer) {
- this.kullanıcı_değer = kullanıcı_değer;
- }
-
- public int getKullanıcı_ayrı() {
- return kullanıcı_ayrı;
- }
-
- public void setKullanıcı_ayrı(int kullanıcı_ayrı) {
- this.kullanıcı_ayrı = kullanıcı_ayrı;
- }
-
- public int getKupiyer_değer() {
- return kupiyer_değer;
- }
-
- public void setKupiyer_değer(int kupiyer_değer) {
- this.kupiyer_değer = kupiyer_değer;
- }
-
- public String[] getTipler() {
- return tipler;
- }
-
- public void setTipler(String[] tipler) {
- this.tipler = tipler;
- }
-
- public String[] getKartlar() {
- return kartlar;
- }
-
- public void setKartlar(String[] kartlar) {
- this.kartlar = kartlar;
- }
-
- public void Kartlatı_göster() {
- System.out.print("Kupiyerin Kartları: ");
- System.out.print(kupiyer.get(0) + "--");
- System.out.print("X ");
- System.out.println("\n-------------------------\n");
-
- System.out.print("Kullanıcının Kartları: ");
- for (String kart : kullanıcı) {
- System.out.print(kart + "--");
- }
-
- if (!kullanıcı_ayrılmış.isEmpty()) {
- System.out.print("\nKullanıcının Ayrılmış Kartları: ");
- for (String kart : kullanıcı_ayrılmış) {
- System.out.print(kart + " ");
- }
- }
- System.out.println("\n-------------------------\n");
- }
-
- public void SonKartlatı_göster() {
- System.out.print("Kupiyerin Kartları: ");
- for (String kart : kupiyer) {
- System.out.print(kart + "--");
- }
- System.out.println("\n-------------------------\n");
-
- System.out.print("Kullanıcının Kartları: ");
- for (String kart : kullanıcı) {
- System.out.print(kart + "--");
- }
-
- if (!kullanıcı_ayrılmış.isEmpty()) {
- System.out.print("\nKullanıcının Ayrılmış Kartları: ");
- for (String kart : kullanıcı_ayrılmış) {
- System.out.print(kart + "--");
- }
- }
- System.out.println("\n-------------------------\n");
- }
-
- public void reset(){
- kullanıcı.clear();
- kullanıcı_ayrılmış.clear();
- kupiyer.clear();
-
- kullanıcı_değer = 0;
- kullanıcı_ayrı = 0;
- kupiyer_değer = 0;
- yeterliKart = false;
- kartlar_esit = false;
-
- }
-
- public boolean isKartlar_esit() {
- return kartlar_esit;
- }
-
- public void setKartlar_esit(boolean kartlar_esit) {
- this.kartlar_esit = kartlar_esit;
- }
-}
diff --git a/Game.java b/Game.java
deleted file mode 100644
index 454bf68..0000000
--- a/Game.java
+++ /dev/null
@@ -1,100 +0,0 @@
-public abstract class Game {
-
- private double muz_coin;
- private double yatirilan_para;
- protected boolean blackjack;
-
- public Game (double muz_coin){
- this.muz_coin = muz_coin;
- }
-
- public void win(double oran){
- double kazanc = this.yatirilan_para * oran;
- this.muz_coin = this.muz_coin + kazanc;
- System.out.println("Kazancınız: " + kazanc);
- System.out.println("Güncel muz coin bakiyeniz: " + this.muz_coin);
- };
-
-
- public void win_blackjake(double oran){
- if(blackjack){
- double kazanc = this.yatirilan_para/2 * oran;
- this.muz_coin = this.muz_coin + kazanc;
- }
- else{
- double kazanc = this.yatirilan_para * oran;
- this.muz_coin = this.muz_coin + kazanc;
- }
- System.out.println("Güncel muz coin bakiyeniz: " + this.muz_coin);
- }
-
- public abstract String kurallari_yaz();
-
- public double getMuz_coin() {
- return muz_coin;
- }
-
- public void setMuz_coin(double muz_coin) {
- this.muz_coin = muz_coin;
- }
-
- public double getYatirilan_para() {
- return yatirilan_para;
- }
-
- public void setYatirilan_para(double yatirilan_para) {
- this.yatirilan_para = yatirilan_para;
- }
-
- public abstract void oyun_başlat();
-
- public void para_yatir (double yatirilan_para){
-
- this.muz_coin = this.muz_coin - yatirilan_para;
- this.yatirilan_para = yatirilan_para;
- Muz_joe_vergisi();
-
- }
-
- public void draw(){
- this.muz_coin = this.muz_coin + this.yatirilan_para;
- }
-
- public void Muz_joe_vergisi() {
- double sayi = Math.random(); // 0 ile 1 arasında rastgele bir sayı üretir
- if (sayi > 0.035) {
- System.out.println("Muz Joe vergi istiyor");
- double vergi_katsıyısı = Math.random();
- double vergi = this.yatirilan_para * vergi_katsıyısı;
- this.yatirilan_para = this.yatirilan_para - vergi;
- System.out.println("Yatırdığınız paradana alınan vergi : " + vergi);
- System.out.println("Yatırılan pardan kalan : " + this.yatirilan_para);
-
- }
- else {
- System.out.println("Muz Joe seni bağışladı vergi yok");
- }
- }
-
- public String Oyunlari_yaz() {
- return "q.....Geri Dön\n"
- + "1....Blackjack\n"
- + "2....Yazı/Tura\n"
- + "3....Yüksek Zar\n"
- + "4....Rulet\n"
- + "5....Çark\n"
- + "6....Bul parayı al karayı\n"
- + "7....Taş kağıt makas\n"
- + "8....Kart eşleştirme\n";
- }
-
-
-
-
-
-
-
-
-
-
-}
diff --git a/HighDice.java b/HighDice.java
deleted file mode 100644
index b69d70f..0000000
--- a/HighDice.java
+++ /dev/null
@@ -1,64 +0,0 @@
-import java.util.Random;
-import java.util.Scanner;
-
-public class HighDice extends Game {
-
- public HighDice(double muz_coin) {
- super(muz_coin);
- }
-
- @Override
- public String kurallari_yaz() {
- return "High Dice Oyunu Kuralları:\n" +
- "1. Oyuncu ve bilgisayar zar atar.\n" +
- "2. En yüksek zar atan kazanır.\n" +
- "3. Beraberlik durumunda oyun tekrar oynanır.\n" +
- "4. Kazanırsanız yatırdığınız miktarın 2 katını kazanırsınız.";
- }
-
- @Override
- public void oyun_başlat() {
- Scanner input = new Scanner(System.in);
- Random random = new Random();
- System.out.println(kurallari_yaz());
-
-
- while (true) {
-
- System.out.println("---------------------------------");
- System.out.println("Muz coin'iniz : " + getMuz_coin());
- System.out.println("---------------------------------");
-
-
- System.out.print("\nYatırmak istediğiniz miktarı girin: ");
- double yatirilanMiktar = input.nextDouble();
- para_yatir(yatirilanMiktar);
-
- int oyuncuZar = random.nextInt(6) + 1; // 1 ile 6 arasında rastgele zar atar
- int bilgisayarZar = random.nextInt(6) + 1;
-
- System.out.println("Oyuncunun zarı: " + oyuncuZar);
- System.out.println("Bilgisayarın zarı: " + bilgisayarZar);
-
- if (oyuncuZar > bilgisayarZar) {
- System.out.println("Kazandınız!");
- win(2.0); // Kazanırsanız 2 katını kazanın
- } else if (oyuncuZar < bilgisayarZar) {
- System.out.println("Kaybettiniz!");
- } else {
- System.out.println("Berabere! Oyun tekrar ediliyor.");
- continue; // Beraberlikte oyunu tekrar ettirir
- }
-
- // input.nextLine() ile önceki boşluğu temizle
- input.nextLine();
-
- System.out.print("\nÇıkmak için 'q' tuşuna basın, yeni oyun için herhangi bir tuşa");
- String devam = input.nextLine();
- if (devam.equalsIgnoreCase("q")) {
- System.out.println("Oyun sonlandırıldı.");
- break;
- }
- }
- }
-}
diff --git a/Main.java b/Main.java
deleted file mode 100644
index 879ae28..0000000
--- a/Main.java
+++ /dev/null
@@ -1,204 +0,0 @@
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Scanner;
-
-public class Main {
-
- public static void kapat() {
- System.out.println("Program sonlandırılıyor...");
- System.exit(0);
- }
-
- public static void GüncelleVeKapat(String ad, String sifre, double muz_coin, String gender, ArrayList clothes, ArrayList character_clothes, boolean yeni_kullanıcı) {
- File dosya = new File("Uygulama_Bilgileri.txt");
- ArrayList satirlar = new ArrayList<>();
- boolean kullaniciBulundu = false;
-
- // Dosyayı oku ve satırları listeye ekle
- try (Scanner scanner = new Scanner(new BufferedReader(new FileReader(dosya)))) {
- while (scanner.hasNextLine()) {
- String satir = scanner.nextLine();
- String[] bilgiler = satir.split(",");
-
- if (bilgiler[0].equals(ad)) {
- kullaniciBulundu = true;
- if (!yeni_kullanıcı) {
- // Mevcut kullanıcı bilgilerini güncelle
- satir = ad + "," + sifre + "," + muz_coin + "," + gender + "," + listToString(clothes) + "," + listToString(character_clothes);
- }
- }
- satirlar.add(satir);
- }
- } catch (FileNotFoundException ex) {
- System.out.println("Dosya Bulunamadı...");
- } catch (IOException ex) {
- System.out.println("Dosya açılırken hata oluştu.");
- }
-
- // Yeni kullanıcıysa, listeye yeni bilgileri ekle
- if (!kullaniciBulundu && yeni_kullanıcı) {
- String yeniSatir = ad + "," + sifre + "," + muz_coin + "," + gender + "," + listToString(clothes) + "," + listToString(character_clothes);
- satirlar.add(yeniSatir);
- }
-
- // Dosyayı yeniden yaz
- try (PrintWriter writer = new PrintWriter(new FileWriter(dosya))) {
- for (String s : satirlar) {
- writer.println(s);
- }
- System.out.println("Bilgiler başarıyla kaydedildi.");
- } catch (IOException ex) {
- System.out.println("Dosya yazılırken hata oluştu.");
- }
-
- // Programı kapat
- kapat();
- }
-
- // Yardımcı metod: ArrayList'i "-" ile birleştirilmiş String'e dönüştürür
- private static String listToString(ArrayList list) {
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < list.size(); i++) {
- sb.append(list.get(i));
- if (i < list.size() - 1) {
- sb.append("-");
- }
- }
- return sb.toString();
- }
-
- private static ArrayList parseIDList(String idString) {
- ArrayList idList = new ArrayList<>();
- if (!idString.isEmpty()) {
- String[] ids = idString.split("-");
- for (String id : ids) {
- idList.add(Integer.parseInt(id));
- }
- }
- return idList;
- }
-
- public static String[] uyelik_durumu(String ad, String sifre) {
- try (Scanner scanner = new Scanner(new BufferedReader(new FileReader("Uygulama_Bilgileri.txt")))) {
- while (scanner.hasNextLine()) {
- String satir = scanner.nextLine();
- String[] bilgiler = satir.split(",");
-
- if (bilgiler[0].equals(ad) && bilgiler[1].equals(sifre)) {
- return bilgiler;
- }
- }
- } catch (FileNotFoundException ex) {
- System.out.println("Dosya Bulunamadı...");
- } catch (IOException ex) {
- System.out.println("Dosya açılırken hata oluştu.");
- }
-
- return null;
- }
-
- public static void main(String[] args) {
- String ad;
- String sifre;
- String sifre_2;
- String gender = "";
- ArrayList clothes = new ArrayList<>();
- ArrayList character_clothes = new ArrayList<>();
- double muz_coin = 0;
- boolean yeni_kullanıcı;
- String[] kullaniciBilgileri;
-
- Scanner input = new Scanner(System.in);
-
- while (true) {
- System.out.println("------------------------------------------------------\n"
- + "Muz Cumhuriyeti Karakter Giydirmeceye Hoşgeldiniz.\n"
- + "Üye girişi yapmak için lütfen 1'e basın\n"
- + "Yeni kullanıcı oluşturmak için 2'ye basın\n"
- + "Uygulamadan çıkmak için 3'e basın\n"
- + "------------------------------------------------------");
-
- System.out.print("Tercihiniz: ");
- int a = input.nextInt();
- input.nextLine(); // Dummy Scanner
-
- if (a == 1) {
- System.out.print("Kullanıcı Adınızı giriniz: ");
- ad = input.nextLine();
- System.out.print("Şifreniz: ");
- sifre = input.nextLine();
- kullaniciBilgileri = uyelik_durumu(ad, sifre);
-
- if (kullaniciBilgileri != null) {
- System.out.println("Hoşgeldin " + ad);
- yeni_kullanıcı = false;
- muz_coin = Double.parseDouble(kullaniciBilgileri[2]);
- gender = kullaniciBilgileri[3];
- clothes = parseIDList(kullaniciBilgileri[4]);
- character_clothes = parseIDList(kullaniciBilgileri[5]);
- GüncelleVeKapat(ad, sifre, muz_coin, gender, clothes, character_clothes, yeni_kullanıcı);
- } else {
- System.out.println("Hesabınız bulunamadı. Tekrar deneyiniz ya da hesap oluşturunuz.");
- }
-
- } else if (a == 2) {
- System.out.print("Kullanıcı Adınızı giriniz: ");
- ad = input.nextLine();
-
- while (true) {
- System.out.print("Şifrenizi giriniz: ");
- sifre = input.nextLine();
- System.out.print("Şifrenizi tekrar giriniz: ");
- sifre_2 = input.nextLine();
-
- if (!sifre.equals(sifre_2)) {
- System.out.println("Şifreler eşleşmedi, lütfen tekrar girin.");
- } else {
-
- while(true){
- System.out.println("Please select character gender\n" +
- "1..Male\n" +
- "2..Woman");
- int x = input.nextInt();
-
- if ( x == 1) {
- gender = "Male";
- break;
- }
-
- else if(x == 2){
- gender = "Woman";
- break;
- }
- else{
- System.out.println("Lütfen geçerli bir değer girin");
- }
-
- }
-
- System.out.println("Kayıt işlemi başarılı");
- System.out.println("Hoşgeldin " + ad);
- yeni_kullanıcı = true;
- System.out.println("Etrafı Gösterelim mi (Ödüllü olabilir) kabul etmek için e'ye basın");
- String yes = input.nextLine();
-
- if (yes.equalsIgnoreCase("e")) {
- System.out.println("Uygulmamamıza kayıt olduğunuz için teşekkür ederiz. Ekranda görünen bölümlere gitmek için yanında yazan sayıyı girebilirsiniz eğer bir önceki sayfaya dönmek isterseniz lütfen q tuşuna basınız. Programı kapatmak içinde -+-'yi tuşlayın\n"
- + "Başkanımız Banana Joe oynadığınız oyunlardan belli oranda vergi alabilir, yaşasın Muz Cumhuriyeti");
- System.out.println("Tebrikler 1000 muz_coin kazandınız");
- muz_coin = 1000;
-
- }
-
-
- break;
- }
- }
- } else if (a == 3) {
- kapat();
- } else {
- System.out.println("Lütfen geçerli bir değer girin.");
- }
- }
- }
-}
diff --git a/Name b/Name
deleted file mode 100644
index 834ee93..0000000
--- a/Name
+++ /dev/null
@@ -1 +0,0 @@
-Altay Ege Gülkıran
\ No newline at end of file
diff --git a/Name2 b/Name2
deleted file mode 100644
index 52c9804..0000000
--- a/Name2
+++ /dev/null
@@ -1 +0,0 @@
-Melek Cetinel
diff --git a/Profile.java b/Profile.java
deleted file mode 100644
index 7794b6f..0000000
--- a/Profile.java
+++ /dev/null
@@ -1,108 +0,0 @@
-import java.util.ArrayList;
-
-public class Profile {
-
- private String username;
- private String password;
- private String gender;
- private double muzCoin;
-
- private ArrayList wardrobe;
- private ArrayList equippedItems;
-
- private ArrayList wardrobeIDs;
- private ArrayList equippedItemIDs;
-
- public Profile(String username, String password, String gender, double muzCoin, ArrayList wardrobeIDs, ArrayList equippedItemIDs, ArrayList clothes) {
- this.username = username;
- this.password = password;
- this.gender = gender;
- this.muzCoin = muzCoin;
-
- this.wardrobeIDs = new ArrayList<>(wardrobeIDs);
- this.equippedItemIDs = new ArrayList<>(equippedItemIDs);
- this.wardrobe = new ArrayList<>();
- this.equippedItems = new ArrayList<>();
-
- convertIDsToNames(this.wardrobeIDs, this.wardrobe, clothes);
- convertIDsToNames(this.equippedItemIDs, this.equippedItems, clothes);
- }
-
- private void convertIDsToNames(ArrayList IDs, ArrayList output, ArrayList clothes) {
- for (int id : IDs) {
- for (Abstract_Clothes item : clothes) {
- if (item.getID() == id) {
- output.add(item.getName());
- }
- }
- }
- }
-
- public void addToWardrobe(int id, ArrayList clothes) {
- for (Abstract_Clothes item : clothes) {
- if (item.getID() == id) {
- wardrobeIDs.add(id);
- wardrobe.add(item.getName());
- System.out.println(item.getName() + " has been added to the wardrobe.");
- return;
- }
- }
- System.out.println("Item with ID " + id + " not found.");
- }
-
- public void equipItem(int id, ArrayList clothes) {
- for (Abstract_Clothes item : clothes) {
- if (item.getID() == id) {
- equippedItemIDs.add(id);
- equippedItems.add(item.getName());
- System.out.println(item.getName() + " has been equipped.");
- return;
- }
- }
- System.out.println("Item with ID " + id + " not found.");
- }
-
- public void unequipItem(int id) {
- int index = equippedItemIDs.indexOf(id);
- if (index != -1) {
- System.out.println(equippedItems.get(index) + " has been unequipped.");
- equippedItemIDs.remove(index);
- equippedItems.remove(index);
- } else {
- System.out.println("Item with ID " + id + " is not equipped.");
- }
- }
-
- public void viewWardrobe() {
- System.out.println("Wardrobe Contents:");
- if (wardrobe.isEmpty()) {
- System.out.println(" - Wardrobe is empty.");
- } else {
- for (String item : wardrobe) {
- System.out.println(" - " + item);
- }
- }
- }
-
- public void viewEquippedItems() {
- System.out.println("Equipped Items:");
- if (equippedItems.isEmpty()) {
- System.out.println(" - No items equipped.");
- } else {
- for (String item : equippedItems) {
- System.out.println(" - " + item);
- }
- }
- }
-
- public void convertNamesToIDs(ArrayList names, ArrayList output, ArrayList clothes) {
- for (String name : names) {
- for (Abstract_Clothes item : clothes) {
- if (name.equalsIgnoreCase(item.getName())) {
- output.add(item.getID());
- }
- }
- }
- }
-}
-
diff --git a/ProfileManagement.java b/ProfileManagement.java
deleted file mode 100644
index 36941f5..0000000
--- a/ProfileManagement.java
+++ /dev/null
@@ -1,3 +0,0 @@
-public class ProfileManagement {
-
-}
diff --git a/README.md b/README.md
deleted file mode 100644
index a52c1f8..0000000
--- a/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# CS105-Proje
- ## Muz Cumhuriyeti Gorev Dagilimlari ##
-
-- Oyun kismi; Ege yapacak. (Hafta sonu bitiyor main kısındaki tarafıda halledeceğim) Güncelleme Bitti
-- Profil kismi; Kayra yapacak.
-- Magaza kismi; Melek yapacak.
-- Banka kismi; Selin yapacak.
-
-- Kodlar herkesin kendi localinde, daha sonra main'e pushlanacak.
-- Cuma tekrar konusacagiz.
-
--Lütfen ortak değişken isimlerinde çalılaşalım
-
-- Karakter vs sahip olduğun kıyafetleri id olarak çekiyor. Onu ya profilde ya da mainde isime döüştürmemiz lazım (Profilde daha kolay olur)Ü
-- Banka hata veriyor
-
-
diff --git a/Roulette.java b/Roulette.java
deleted file mode 100644
index 03f2613..0000000
--- a/Roulette.java
+++ /dev/null
@@ -1,130 +0,0 @@
-import java.util.ArrayList;
-import java.util.Random;
-import java.util.Scanner;
-
-public class Roulette extends Game {
-
- private ArrayList bahisler = new ArrayList<>();
- private ArrayList miktar = new ArrayList<>();
- private String renk;
- private String sonuc;
- private String aralık;
- private double topbahis;
- private double topkazanc;
-
- public Roulette(double muz_coin) {
- super(muz_coin);
- }
-
- public void cark_cevir() {
- Random random = new Random();
- int sayı = random.nextInt(37); // 0 ile 36 arasında rastgele sayı
-
- // Renk belirleme
- if (sayı == 0) {
- this.renk = "Yeşil";
- } else if (sayı % 2 == 0) {
- this.renk = "Kırmızı";
- } else {
- this.renk = "Siyah";
- }
-
- this.sonuc = String.valueOf(sayı);
-
- // Aralık belirleme
- if (sayı >= 1 && sayı <= 12) {
- this.aralık = "1-12";
- } else if (sayı >= 13 && sayı <= 24) {
- this.aralık = "13-24";
- } else if (sayı >= 25 && sayı <= 36) {
- this.aralık = "25-36";
- } else {
- this.aralık = "0";
- }
-
- System.out.println("Çark sonucu: " + sonuc + " (" + renk + "), Aralık: " + aralık);
- }
-
- @Override
- public String kurallari_yaz() {
- return "Rulet Oyunu Kuralları:\n" +
- "1. Bir sayı (0-36), renk (Kırmızı/Siyah/Yeşil) veya aralık (1-12, 13-24, 25-36) üzerine bahis yapabilirsiniz.\n" +
- "2. Renk tahmininiz doğruysa yatırdığınız miktarın 2 katını kazanırsınız.\n" +
- "3. Aralık tahmininiz doğruysa yatırdığınız miktarın 3 katını kazanırsınız.\n" +
- "4. Sayı tahmininiz doğruysa yatırdığınız miktarın 36 katını kazanırsınız.";
- }
-
-
- @Override
- public void oyun_başlat() {
- Scanner input = new Scanner(System.in);
-
- while (true) {
- bahisler.clear();
- miktar.clear();
- topbahis = 0;
- topkazanc = 0;
-
- System.out.println(kurallari_yaz());
-
-
- while (true) {
- System.out.println("---------------------------------");
- System.out.println("Muz coin'iniz : " + getMuz_coin());
- System.out.println("---------------------------------");
- System.out.print("Lütfen bahisinizi nereye yapacağınızı seçin (Sayı/Renk/Aralık): ");
- String bahis = input.nextLine();
- System.out.print("Lütfen bahis miktarını girin: ");
- double miktarDegeri = input.nextDouble();
-
- bahisler.add(bahis);
- miktar.add(miktarDegeri);
- topbahis += miktarDegeri;
-
- input.nextLine(); // Boşluğu temizle
-
- System.out.print("Başka bahis yatırmak için 'y' girin, tamamlamak için başka bir tuşa basın: ");
- String devam = input.nextLine();
- if (!devam.equalsIgnoreCase("y")) {
- break;
- }
- }
-
- System.out.println("\nEğlence Başlasın!");
- cark_cevir();
- para_yatir(topbahis);
-
- for (int i = 0; i < bahisler.size(); i++) {
- String bahis = bahisler.get(i);
- double bahisMiktari = miktar.get(i);
-
- if (bahis.equalsIgnoreCase(renk)) {
- topkazanc += bahisMiktari * 2;
- }
-
- if (bahis.equalsIgnoreCase(aralık)) {
- topkazanc += bahisMiktari * 3;
- }
-
- if (bahis.equals(sonuc)) {
- topkazanc += bahisMiktari * 36;
- }
- }
-
- if (topkazanc > 0) {
- win(topkazanc / topbahis); // Oran olarak kazanç hesaplanır
- }
-
- this.topbahis =0 ;
- this.topkazanc=0;
-
- // Oyunun devamı için kullanıcıya sor
- System.out.print("\nÇıkmak için 'q' tuşuna basın, yeni oyun için herhangi bir tuşa");
- String cikis = input.nextLine();
- if (cikis.equalsIgnoreCase("q")) {
- System.out.println("Oyun sonlandırıldı.");
- break;
- }
- }
- }
-}
diff --git a/Uygulama_Bilgileri b/Uygulama_Bilgileri
deleted file mode 100644
index e69de29..0000000
diff --git a/Wheel.java b/Wheel.java
deleted file mode 100644
index 8a9f30d..0000000
--- a/Wheel.java
+++ /dev/null
@@ -1,78 +0,0 @@
-import java.util.Scanner;
-
-public class Wheel extends Game{
-
-
- private double [] cak_guvenli = {1, 1.5, 2, 1.2, 1.7, 1, 1, 0, 0, 0};
- private double[] cak_orta = {0, 0, 1, 1, 1, 0, 1.5, 0, 4, 5};
- private double[] cak_riskli = {0, 0, 2, 0, 21, 0, 1, 0, 0, 13};
-
- public Wheel(double muz_coin) {
- super(muz_coin);
- }
-
-
- @Override
- public String kurallari_yaz() {
-
- return "1. Lütfen yatıracağınız parayı seçin\n" +
- "2. Risk seviyesine göre çarklardan birini seçin\n";
- }
-
-
- @Override
- public void oyun_başlat() {
- Scanner input = new Scanner(System.in);
- double[] seçilen_çark;
-
- System.out.println("\nÇark Oyununa Hoş Geldiniz!");
- System.out.println(kurallari_yaz());
-
- while (true) {
- System.out.println("---------------------------------");
- System.out.println("Muz coin'iniz : " + getMuz_coin());
- System.out.println("---------------------------------");
- System.out.print("Yatıracağınız miktarı girin: ");
- setYatirilan_para(input.nextDouble());
-
- System.out.println("1. Güvenli Çark\n2. Orta Çark\n3. Riskli Çark");
- System.out.print("Seçiminizi yapın ((1)..Güvenli/ (2)..Normal/ (3)..Riskli): ");
- int secim = input.nextInt();
-
- switch (secim) {
- case 1:
- seçilen_çark = cak_guvenli;
- break;
- case 2:
- seçilen_çark = cak_orta;
- break;
- case 3:
- seçilen_çark = cak_riskli;
- break;
- default:
- System.out.println("Geçersiz seçim, güvenli çark seçildi.");
- seçilen_çark = cak_guvenli;
- break;
- }
-
- int indeks = (int) (Math.random() * seçilen_çark.length);
- double sonuc = seçilen_çark[indeks];
-
- System.out.println("Çark sonucu: " + sonuc);
- win(sonuc);
-
- // input.nextLine() kullanarak önceki satırdaki boşluğu temizliyoruz
- input.nextLine();
-
- System.out.print("\nÇıkmak için 'q' tuşuna basın, yeni oyun için herhangi bir tuşa");
- String devam = input.nextLine();
- if (devam.equalsIgnoreCase("q")) {
- System.out.println("Oyun sonlandırıldı.");
- break;
- }
- }
- }
-
-
-
-}
diff --git a/follow_the_lady.java b/follow_the_lady.java
deleted file mode 100644
index 0a3f1d4..0000000
--- a/follow_the_lady.java
+++ /dev/null
@@ -1,62 +0,0 @@
-import java.util.Random;
-import java.util.Scanner;
-
-public class follow_the_lady extends Game {
-
- public follow_the_lady(double muz_coin) {
- super(muz_coin);
- }
-
- @Override
- public String kurallari_yaz() {
- return "Follow the Lady Oyunu Kuralları:\n" +
- "1. Üç kart arasından 'Lady' (Bayan) kartını bulmaya çalışın.\n" +
- "2. Kartlar karıştırılır ve sizden 'Lady' kartının yerini tahmin etmeniz istenir.\n" +
- "3. Doğru tahmin ederseniz yatırdığınız miktarın 3 katını kazanırsınız.\n" +
- "4. Yanlış tahmin ederseniz yatırdığınız miktarı kaybedersiniz.";
- }
-
- @Override
- public void oyun_başlat() {
- Scanner input = new Scanner(System.in);
- Random random = new Random();
-
- while (true) {
-
- System.out.println("---------------------------------");
- System.out.println("Muz coin'iniz : " + getMuz_coin());
- System.out.println("---------------------------------");
-
-
- System.out.print("\nYatırmak istediğiniz miktarı girin: ");
- double yatirilanMiktar = input.nextDouble();
- para_yatir(yatirilanMiktar);
-
- // Kartların karıştırılması
- int ladyPosition = random.nextInt(3) + 1; // 1 ile 3 arasında rastgele bir pozisyon
-
- System.out.println("Kartlar karıştırılıyor...");
- System.out.println("1 2 3"); // Kartların pozisyonları
- System.out.print("Lady'nin (Bayan) kartının hangi pozisyonda olduğunu tahmin ediyorsunuz? (1/2/3): ");
- int tahmin = input.nextInt();
-
- if (tahmin == ladyPosition) {
- System.out.println("Tebrikler! Doğru tahmin ettiniz. Lady kartı pozisyon " + ladyPosition + "’daydı.");
- win(3.0); // Kazanırsanız 3 katını kazanın
- } else {
- System.out.println("Üzgünüm! Yanlış tahmin. Lady kartı pozisyon " + ladyPosition + "’daydı.");
- }
-
- // input.nextLine() ile önceki boşluğu temizle
- input.nextLine();
-
- // Oyunun devamı için kullanıcıya sor
- System.out.print("\nÇıkmak için 'q' tuşuna basın, yeni oyun için herhangi bir tuşa");
- String devam = input.nextLine();
- if (devam.equalsIgnoreCase("q")) {
- System.out.println("Oyun sonlandırıldı.");
- break;
- }
- }
- }
-}
diff --git a/heads_or_tails.java b/heads_or_tails.java
deleted file mode 100644
index 786a85b..0000000
--- a/heads_or_tails.java
+++ /dev/null
@@ -1,68 +0,0 @@
-import java.util.Random;
-import java.util.Scanner;
-
-public class heads_or_tails extends Game {
-
- public heads_or_tails(double muz_coin) {
- super(muz_coin);
- }
-
- @Override
- public String kurallari_yaz() {
- return "Yazı-Tura Oyunu Kuralları:\n" +
- "1. Yatırmak istediğiniz miktarı seçin.\n" +
- "2. Yazı veya tura tahmininizi yapın.\n" +
- "3. Doğru tahmin ederseniz kazanç sağlarsınız.\n" +
- "4. Yanlış tahmin ederseniz yatırdığınız parayı kaybedersiniz.";
- }
-
- @Override
- public void oyun_başlat() {
- Scanner input = new Scanner(System.in);
- Random random = new Random();
- System.out.println(kurallari_yaz());
-
-
- while (true) {
-
- System.out.println("---------------------------------");
- System.out.println("Muz coin'iniz : " + getMuz_coin());
- System.out.println("---------------------------------");
-
-
- System.out.print("\nYatırmak istediğiniz miktarı girin: ");
- double yatirilanMiktar = input.nextDouble();
- para_yatir(yatirilanMiktar);
-
- System.out.print("Tahmininizi yapın (1: Yazı, 2: Tura): ");
- int tahmin = input.nextInt();
-
- if (tahmin != 1 && tahmin != 2) {
- System.out.println("Geçersiz seçim! Lütfen 1 (Yazı) veya 2 (Tura) girin.");
- continue;
- }
-
- String[] secenekler = {"Yazı", "Tura"};
- String sonuc = secenekler[random.nextInt(2)];
-
- System.out.println("Sonuç: " + sonuc);
-
- if ((tahmin == 1 && sonuc.equals("Yazı")) || (tahmin == 2 && sonuc.equals("Tura"))) {
- System.out.println("Tahmininiz doğru! Kazandınız.");
- win(2.0); // Kazanırsanız 2 katını kazanın
- } else {
- System.out.println("Tahmininiz yanlış! Kaybettiniz.");
- }
-
- // input.nextLine() ile önceki boşluğu temizle
- input.nextLine();
-
- System.out.print("\nÇıkmak için 'q' tuşuna basın, yeni oyun için herhangi bir tuşa");
- String devam = input.nextLine();
- if (devam.equalsIgnoreCase("q")) {
- System.out.println("Oyun sonlandırıldı.");
- break;
- }
- }
- }
-}
diff --git a/out/production/CS105-Projects/.gitattributes b/out/production/CS105-Projects/.gitattributes
new file mode 100644
index 0000000..dfe0770
--- /dev/null
+++ b/out/production/CS105-Projects/.gitattributes
@@ -0,0 +1,2 @@
+# Auto detect text files and perform LF normalization
+* text=auto
diff --git a/out/production/CS105-Projects/.gitignore b/out/production/CS105-Projects/.gitignore
new file mode 100644
index 0000000..524f096
--- /dev/null
+++ b/out/production/CS105-Projects/.gitignore
@@ -0,0 +1,24 @@
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+replay_pid*
diff --git a/out/production/CS105-Projects/.idea/CS105-Projects.iml b/out/production/CS105-Projects/.idea/CS105-Projects.iml
new file mode 100644
index 0000000..0c6566e
--- /dev/null
+++ b/out/production/CS105-Projects/.idea/CS105-Projects.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/out/production/CS105-Projects/.idea/modules.xml b/out/production/CS105-Projects/.idea/modules.xml
new file mode 100644
index 0000000..b30b4c8
--- /dev/null
+++ b/out/production/CS105-Projects/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/out/production/CS105-Projects/.idea/vcs.xml b/out/production/CS105-Projects/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/out/production/CS105-Projects/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/out/production/CS105-Projects/.idea/workspace.xml b/out/production/CS105-Projects/.idea/workspace.xml
new file mode 100644
index 0000000..94a3d2e
--- /dev/null
+++ b/out/production/CS105-Projects/.idea/workspace.xml
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ "lastFilter": {
+ "state": "OPEN",
+ "assignee": "MelekCetinel"
+ }
+}
+ {
+ "selectedUrlAndAccountId": {
+ "url": "https://github.com/AltEGE/CS105-Projects.git",
+ "accountId": "d39773c6-d642-4c52-88f8-f5fb265d4e6a"
+ }
+}
+
+
+
+ {
+ "customColor": "",
+ "associatedIndex": 6
+}
+
+
+
+
+
+ {
+ "keyToString": {
+ "Application.Main.executor": "Run",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "git-widget-placeholder": "MelekCetinel",
+ "kotlin-language-version-configured": "true",
+ "node.js.detected.package.eslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "project.structure.last.edited": "Modules",
+ "project.structure.proportion": "0.15",
+ "project.structure.side.proportion": "0.2",
+ "settings.editor.selected.configurable": "preferences.keymap",
+ "vue.rearranger.settings.migration": "true"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1734033527881
+
+
+
+ 1734033527881
+
+
+
+ 1734384650012
+
+
+ 1734384650012
+
+
+
+
+
+ 1734386439276
+
+
+
+ 1734386439276
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/rock_paper_scissors.java b/rock_paper_scissors.java
deleted file mode 100644
index 50eb2ad..0000000
--- a/rock_paper_scissors.java
+++ /dev/null
@@ -1,78 +0,0 @@
-import java.util.Random;
-import java.util.Scanner;
-
-public class rock_paper_scissors extends Game {
-
- public rock_paper_scissors(double muz_coin) {
- super(muz_coin);
- }
-
-
- @Override
- public String kurallari_yaz() {
- return "Taş-Kağıt-Makas Oyunu Kuralları:\n" +
- "1. Taş makası yener.\n" +
- "2. Kağıt taşı yener.\n" +
- "3. Makas kağıdı yener.\n" +
- "4. Oyuncu ve bilgisayar aynı seçimi yaparsa oyun berabere biter.";
- }
-
-
- @Override
- public void oyun_başlat() {
- Scanner input = new Scanner(System.in);
- Random random = new Random();
- String[] secenekler = {"Taş", "Kağıt", "Makas"};
- System.out.println(kurallari_yaz());
- System.out.println("---------------------------------");
- System.out.println("Muz coin'iniz : " + getMuz_coin());
- System.out.println("---------------------------------");
-
- while (true) {
-
- System.out.println("---------------------------------");
- System.out.println("Muz coin'iniz : " + getMuz_coin());
- System.out.println("---------------------------------");
-
- System.out.print("\nYatırmak istediğiniz miktarı girin: ");
- double yatirilanMiktar = input.nextDouble();
- para_yatir(yatirilanMiktar);
-
- System.out.print("Seçiminizi yapın (1: Taş, 2: Kağıt, 3: Makas): ");
- int oyuncuSecimi = input.nextInt();
-
- if (oyuncuSecimi < 1 || oyuncuSecimi > 3) {
- System.out.println("Geçersiz seçim! Lütfen 1, 2 veya 3 girin.");
- continue;
- }
-
- String oyuncuHamlesi = secenekler[oyuncuSecimi - 1];
- String bilgisayarHamlesi = secenekler[random.nextInt(3)];
-
- System.out.println("Oyuncu seçimi: " + oyuncuHamlesi);
- System.out.println("Bilgisayar seçimi: " + bilgisayarHamlesi);
-
- if (oyuncuHamlesi.equals(bilgisayarHamlesi)) {
- System.out.println("Oyun berabere!");
- draw();
- } else if ((oyuncuHamlesi.equals("Taş") && bilgisayarHamlesi.equals("Makas")) ||
- (oyuncuHamlesi.equals("Kağıt") && bilgisayarHamlesi.equals("Taş")) ||
- (oyuncuHamlesi.equals("Makas") && bilgisayarHamlesi.equals("Kağıt"))) {
- System.out.println("Kazandınız!");
- win(2.0);
- } else {
- System.out.println("Kaybettiniz!");
- }
-
- // input.nextLine() kullanarak önceki satırdaki boşluğu temizle
- input.nextLine();
-
- System.out.print("\nÇıkmak için 'q' tuşuna basın, yeni oyun için herhangi bir tuşa");
- String devam = input.nextLine();
- if (devam.equalsIgnoreCase("q")) {
- System.out.println("Oyun sonlandırıldı.");
- break;
- }
- }
- }
-}
diff --git a/src/Clothes/Abstract_Clothes.java b/src/Clothes/Abstract_Clothes.java
new file mode 100644
index 0000000..1d8540e
--- /dev/null
+++ b/src/Clothes/Abstract_Clothes.java
@@ -0,0 +1,43 @@
+package src.Clothes;
+
+public abstract class Abstract_Clothes {
+ protected double price;
+ protected String color;
+
+ protected String bodyPart;
+ protected String model;
+
+ protected int ID;
+
+ public Abstract_Clothes(double price, String color, int ID) {
+ this.price = price;
+ this.color = color;
+ this.ID = ID;
+ }
+
+ public void getInfo(){
+ System.out.println("ID : " + ID + "\n"
+ + "Your item is " + color + " " + model + "\n"
+ + "Model price is " + price );
+ System.out.println("-------------------------------------");
+ }
+
+
+ public double getPrice() {
+ return price;
+ }
+ public void setPrice(double price) {this.price = price;}
+
+ public String getColor() {return color;}
+ public void setColor(String color) {
+ this.color = color;
+ }
+
+
+ public int getID() {
+ return ID;
+ }
+ public void setID(int ID) {
+ this.ID = ID;
+ }
+}
diff --git a/src/Clothes/Glasses.java b/src/Clothes/Glasses.java
new file mode 100644
index 0000000..2adb97e
--- /dev/null
+++ b/src/Clothes/Glasses.java
@@ -0,0 +1,15 @@
+package src.Clothes;
+
+public class Glasses extends Abstract_Clothes {
+
+ public Glasses(double price, String color, int ID){
+ super(price, color, ID);
+ this.bodyPart = "Head Body";
+ this.model = "Glasses";
+
+ }
+ public String getModel(){
+ return model;
+ }
+ public void setModel(){this.model = model;}
+}
diff --git a/src/Clothes/Glove.java b/src/Clothes/Glove.java
new file mode 100644
index 0000000..518bd37
--- /dev/null
+++ b/src/Clothes/Glove.java
@@ -0,0 +1,14 @@
+package src.Clothes;
+
+public class Glove extends Abstract_Clothes {
+ public Glove (double price,String color, int ID) {
+ super(price, color, ID);
+ this.bodyPart = " Hand Part";
+ this.model = "Glove";
+ }
+
+ public String getModel(){return model;}
+ public void setModel(String model){this.model = model;}
+
+}
+
diff --git a/src/Clothes/Hat.java b/src/Clothes/Hat.java
new file mode 100644
index 0000000..b0df21f
--- /dev/null
+++ b/src/Clothes/Hat.java
@@ -0,0 +1,12 @@
+package src.Clothes;
+
+public class Hat extends Abstract_Clothes {
+ public Hat (double price,String color, int ID) {
+ super(price, color, ID);
+ this.bodyPart = "Head Body";
+ this.model = "Hat";
+ }
+ public String getModel(){return model;}
+ public void setModel(String model){this.model = model;}
+
+}
\ No newline at end of file
diff --git a/src/Clothes/Pant.java b/src/Clothes/Pant.java
new file mode 100644
index 0000000..0478d37
--- /dev/null
+++ b/src/Clothes/Pant.java
@@ -0,0 +1,12 @@
+package src.Clothes;
+
+public class Pant extends Abstract_Clothes {
+ public Pant(double price , String color , int ID){
+ super(price, color, ID);
+ this.bodyPart = "Lower Body";
+ this.model = "Jean";
+ }
+ public String getModel(){return model;}
+ public void setModel(String model){this.model = model;}
+
+}
diff --git a/src/Clothes/Shoe.java b/src/Clothes/Shoe.java
new file mode 100644
index 0000000..b2d51ee
--- /dev/null
+++ b/src/Clothes/Shoe.java
@@ -0,0 +1,12 @@
+package src.Clothes;
+
+public class Shoe extends Abstract_Clothes {
+ public Shoe(double price,String color, int ID) {
+ super(price, color, ID);
+ this.bodyPart = "Feet Part";
+ this.model = "Shoe";
+ }
+
+ public String getModel(){return model;}
+ public void setModel(String model){this.model = model;}
+}
diff --git a/src/Clothes/Skirt.java b/src/Clothes/Skirt.java
new file mode 100644
index 0000000..8f3dfd7
--- /dev/null
+++ b/src/Clothes/Skirt.java
@@ -0,0 +1,12 @@
+package src.Clothes;
+
+public class Skirt extends Abstract_Clothes {
+ public Skirt (double price,String color, int ID){
+ super(price,color, ID);
+ this.bodyPart = "Lower Body";
+ this.model = "Skirt";
+ }
+ public String getModel(){return model;}
+ public void setModel(String model){this.model = model;}
+
+}
diff --git a/src/Clothes/Store.java b/src/Clothes/Store.java
new file mode 100644
index 0000000..97c3e5e
--- /dev/null
+++ b/src/Clothes/Store.java
@@ -0,0 +1,78 @@
+package src.Clothes;
+
+import src.User.Profile;
+
+import java.util.ArrayList;
+import java.util.NoSuchElementException;
+import java.util.Scanner;
+
+public class Store {
+
+ protected ArrayList clothesList = new ArrayList<>();
+
+ public void add_list (Abstract_Clothes c){
+ clothesList.add(c);
+ }
+ public void remove_list (Abstract_Clothes c){clothesList.remove(c);}
+
+ public void display_store_list(){
+ for (Abstract_Clothes c : clothesList) {
+ c.getInfo();
+ }
+ }
+
+ public Abstract_Clothes find_clothes(int id){
+ for (Abstract_Clothes c : clothesList) {
+ if (c.getID() == id) {
+ return c;
+ }
+ }
+ throw new NoSuchElementException("There is no clothes with that Id");
+ }
+
+ public void buy_clothes(Profile user, int id){
+ try{
+ Abstract_Clothes c = find_clothes(id);
+ if (user.getCoin() >= c.getPrice()) {
+ System.out.println("***************************************");
+ System.out.println("You Buy : ");
+ c.getInfo();
+ System.out.println("You have $" + c.getPrice());
+ System.out.println("***************************************");
+ this.clothesList.remove(c);
+ user.buy_clothes(c);
+ } else {
+ System.out.println("You don't have enough money to buy this cloth.");
+ }
+ } catch (NoSuchElementException e) {
+ System.out.println("Invalid ID");
+ }
+ }
+
+ public void visit_store(Profile user){
+ Scanner scanner = new Scanner(System.in);
+
+ System.out.println("Welcome to the Banana Store!");
+ System.out.println("Your Current Budge : " + user.getCoin());
+ System.out.println("You can select what you want to buy: ");
+ this.display_store_list();
+ System.out.println("0 : for Nothing" );
+ int chosen = scanner.nextInt();
+ if (chosen == 0) {
+ System.out.println("Thank you for using Banana Store!");
+ } else {
+ this.buy_clothes(user, chosen);
+ }
+
+ }
+ public String toString(){
+ String store_ids = "";
+ for (Abstract_Clothes c : clothesList) {
+ store_ids = store_ids + c.getID() + "-";
+ }
+ store_ids = store_ids.substring(0, store_ids.length() - 1);
+ return store_ids;
+ }
+
+
+}
diff --git a/src/Clothes/Tshirt.java b/src/Clothes/Tshirt.java
new file mode 100644
index 0000000..8e2f64f
--- /dev/null
+++ b/src/Clothes/Tshirt.java
@@ -0,0 +1,13 @@
+package src.Clothes;
+
+public class Tshirt extends Abstract_Clothes {
+ public Tshirt( double price , String color, int ID) {
+ super(price, color, ID);
+ this.bodyPart = "Upper Body";
+ this.model = "Tshirt";
+ }
+ public String getModel(){
+ return model;
+ }
+ public void setModel(String model){this.model= model;}
+}
diff --git a/src/DataBases/DataLoader.java b/src/DataBases/DataLoader.java
new file mode 100644
index 0000000..168b48e
--- /dev/null
+++ b/src/DataBases/DataLoader.java
@@ -0,0 +1,80 @@
+package src.DataBases;
+import src.Clothes.Store;
+import src.User.Profile;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.Scanner;
+
+public class DataLoader {
+ private Profile profile;
+ private ArrayList inventory_ids = new ArrayList();
+ private ArrayList store_ids = new ArrayList();
+
+ private File profile_file;
+ private File store_file;
+ private Scanner scanner;
+
+ public DataLoader(){}
+
+ public void loadData(){
+ this.readProfileFile();
+ this.readStoreFile();
+ }
+
+ public ArrayList converter(String[] stringNumbers){
+ ArrayList