├── README.md ├── .idea ├── .gitignore ├── vcs.xml ├── compiler.xml ├── AndroidProjectSystem.xml ├── migrations.xml ├── misc.xml ├── deploymentTargetSelector.xml ├── gradle.xml └── runConfigurations.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── TutyFrutySlotForAndroid ├── src │ └── main │ │ ├── res │ │ ├── raw │ │ │ ├── blip2.wav │ │ │ ├── bloop.wav │ │ │ ├── fuu.wav │ │ │ ├── ought.wav │ │ │ ├── pinc.wav │ │ │ ├── droplet.wav │ │ │ └── plink2.wav │ │ ├── drawable-xhdpi │ │ │ ├── symbol00.png │ │ │ ├── symbol01.png │ │ │ ├── symbol02.png │ │ │ ├── symbol03.png │ │ │ ├── symbol04.png │ │ │ ├── symbol05.png │ │ │ ├── symbol06.png │ │ │ ├── symbol07.png │ │ │ ├── symbol08.png │ │ │ ├── symbol09.png │ │ │ ├── background.png │ │ │ ├── lcd_blue_32x32.png │ │ │ ├── lcd_red_32x32.png │ │ │ └── lcd_green_32x32.png │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ ├── values │ │ │ ├── colors.xml │ │ │ ├── styles.xml │ │ │ └── strings.xml │ │ ├── values-v11 │ │ │ └── styles.xml │ │ ├── values-v14 │ │ │ └── styles.xml │ │ ├── menu │ │ │ └── menu_slot.xml │ │ └── layout │ │ │ ├── activity_splash.xml │ │ │ ├── activity_inner_banner.xml │ │ │ ├── activity_about.xml │ │ │ ├── activity_help.xml │ │ │ └── activity_slot.xml │ │ ├── assets │ │ ├── fonts │ │ │ ├── ROCHESTE.TTF │ │ │ ├── STONE ROCK.ttf │ │ │ ├── AlphaMaleModern.ttf │ │ │ └── CFLCD-Regular.ttf │ │ └── banner.html │ │ ├── java │ │ └── eu │ │ │ └── veldsoft │ │ │ └── tuty │ │ │ └── fruty │ │ │ └── slot │ │ │ ├── Util.java │ │ │ ├── AboutActivity.java │ │ │ ├── HelpActivity.java │ │ │ ├── InnerBannerActivity.java │ │ │ ├── ReelsBase.java │ │ │ ├── SplashActivity.java │ │ │ ├── ReelSymbol.java │ │ │ ├── GameConfig.java │ │ │ ├── PayTableScreen.java │ │ │ ├── LinesSelected.java │ │ │ ├── PayoutPercent.java │ │ │ ├── TotalBet.java │ │ │ ├── Bet.java │ │ │ ├── Credit.java │ │ │ ├── PayTable.java │ │ │ ├── PayTableEntry.java │ │ │ ├── Combination.java │ │ │ ├── PrizesFrequency.java │ │ │ ├── GameScreen.java │ │ │ ├── WinnerPaid.java │ │ │ ├── PrizeCombination.java │ │ │ ├── Reels.java │ │ │ ├── SlotActivity.java │ │ │ └── ReelsDistribution.java │ │ └── AndroidManifest.xml └── build.gradle ├── settings.gradle ├── .gitignore ├── import-summary.txt ├── PRIVACY.md ├── gradlew.bat ├── gradlew └── LICENSE.txt /README.md: -------------------------------------------------------------------------------- 1 | Tuty fruty slot for Android 2 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/raw/blip2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/raw/blip2.wav -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/raw/bloop.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/raw/bloop.wav -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/raw/fuu.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/raw/fuu.wav -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/raw/ought.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/raw/ought.wav -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/raw/pinc.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/raw/pinc.wav -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/raw/droplet.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/raw/droplet.wav -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/raw/plink2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/raw/plink2.wav -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/assets/fonts/ROCHESTE.TTF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/assets/fonts/ROCHESTE.TTF -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/assets/fonts/STONE ROCK.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/assets/fonts/STONE ROCK.ttf -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/assets/fonts/AlphaMaleModern.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/assets/fonts/AlphaMaleModern.ttf -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/assets/fonts/CFLCD-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/assets/fonts/CFLCD-Regular.ttf -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol00.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol01.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol02.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol03.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol04.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol05.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol06.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol07.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol08.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/symbol09.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/lcd_blue_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/lcd_blue_32x32.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/lcd_red_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/lcd_red_32x32.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/lcd_green_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VelbazhdSoftwareLLC/tuty-fruty-slot-for-android/HEAD/TutyFrutySlotForAndroid/src/main/res/drawable-xhdpi/lcd_green_32x32.png -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #000000 5 | #FF69B4 6 | 7 | -------------------------------------------------------------------------------- /.idea/AndroidProjectSystem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/Util.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | import java.util.Random; 4 | 5 | class Util { 6 | 7 | PayoutPercent percent; 8 | 9 | PrizesFrequency frequency; 10 | 11 | static Random PRNG = new Random(); 12 | } 13 | -------------------------------------------------------------------------------- /.idea/migrations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | gradlePluginPortal() 6 | } 7 | } 8 | 9 | dependencyResolutionManagement { 10 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 11 | repositories { 12 | google() 13 | mavenCentral() 14 | } 15 | } 16 | 17 | include ':TutyFrutySlotForAndroid' 18 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | /*/build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Mac OS X 30 | .DS_Store 31 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/AboutActivity.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.view.Menu; 6 | import android.view.MenuItem; 7 | 8 | public class AboutActivity extends Activity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_about); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/HelpActivity.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.view.Menu; 6 | import android.view.MenuItem; 7 | 8 | public class HelpActivity extends Activity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_help); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/menu/menu_slot.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/layout/activity_splash.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/layout/activity_inner_banner.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | } 4 | 5 | android { 6 | namespace "eu.veldsoft.tuty.fruty.slot" 7 | compileSdk 34 8 | 9 | defaultConfig { 10 | applicationId "eu.veldsoft.tuty.fruty.slot" 11 | minSdk 25 12 | targetSdk 33 13 | versionCode 4 14 | versionName "1.12" 15 | } 16 | 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | 24 | compileOptions { 25 | sourceCompatibility JavaVersion.VERSION_1_8 26 | targetCompatibility JavaVersion.VERSION_1_8 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.idea/deploymentTargetSelector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/layout/activity_about.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | 18 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/layout/activity_help.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 19 | 20 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | "fonts/ROCHESTE.TTF" 21 | 22 | 23 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/assets/banner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 20 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/InnerBannerActivity.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | import java.util.Timer; 4 | import java.util.TimerTask; 5 | 6 | import android.app.Activity; 7 | import android.content.Intent; 8 | import android.content.pm.PackageManager; 9 | import android.os.Bundle; 10 | import android.view.Menu; 11 | import android.view.MenuItem; 12 | import android.webkit.WebView; 13 | 14 | public class InnerBannerActivity extends Activity { 15 | private long timeout = 0L; 16 | 17 | @Override 18 | protected void onCreate(Bundle savedInstanceState) { 19 | super.onCreate(savedInstanceState); 20 | setContentView(R.layout.activity_inner_banner); 21 | 22 | /* 23 | * Activate JavaScript. 24 | */ 25 | ((WebView) findViewById(R.id.in_ads)).getSettings() 26 | .setJavaScriptEnabled(true); 27 | 28 | /* 29 | * Load local web page as banner holder. 30 | */ 31 | ((WebView) findViewById(R.id.in_ads)) 32 | .loadUrl("file:///android_asset/banner.html"); 33 | 34 | /* 35 | * Get splash screen timeout. 36 | */ 37 | try { 38 | timeout = getPackageManager().getActivityInfo( 39 | this.getComponentName(), 40 | PackageManager.GET_ACTIVITIES 41 | | PackageManager.GET_META_DATA).metaData.getInt( 42 | "timeout", 0); 43 | } catch (Exception e) { 44 | timeout = 0; 45 | } 46 | } 47 | 48 | @Override 49 | protected void onResume() { 50 | super.onResume(); 51 | 52 | new Timer().schedule(new TimerTask() { 53 | public void run() { 54 | try { 55 | InnerBannerActivity.this.finish(); 56 | } catch (Exception e) { 57 | } 58 | } 59 | }, timeout); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Redirect activity is missing! 5 | Tuty Fruty Slot for Android 6 | Tuty Fruty Slot for Android 7 | Tuty Fruty Slot for Android 8 | Help 9 | About 10 | Help 11 | About 12 | " It is a really simple playing for fun slot machine. It uses random numbers and prizes are not in real money. 13 | \n The usage is very simple. Load credit and push the spin button. 14 | \n Have fun!" 15 | " Tuty Fruty Slot for Android is published by Velbazhd Software LLC. 16 | \n This is a playing for fun slot machine game (no gambling). It has five reels, three rows and set of betting lines. 17 | \n Newer versions can be checked at: 18 | \n http://github.com/TodorBalabanov/tuty-fruty-slot-for-android" 19 | SPIN 20 | PAYOUT 21 | LINES 22 | BET 23 | MAX BET 24 | AUTOPLAY 25 | Load 1000 Credit 26 | Advertisement 27 | 28 | -------------------------------------------------------------------------------- /import-summary.txt: -------------------------------------------------------------------------------- 1 | ECLIPSE ANDROID PROJECT IMPORT SUMMARY 2 | ====================================== 3 | 4 | Risky Project Location: 5 | ----------------------- 6 | The tools *should* handle project locations in any directory. However, 7 | due to bugs, placing projects in directories containing spaces in the 8 | path, or characters like ", ' and &, have had issues. We're working to 9 | eliminate these bugs, but to save yourself headaches you may want to 10 | move your project to a location where this is not a problem. 11 | C:\Users\Todor Balabanov\Desktop\tuty-fruty-slot-for-android 12 | - 13 | 14 | Ignored Files: 15 | -------------- 16 | The following files were *not* copied into the new Gradle project; you 17 | should evaluate whether these are still needed in your project and if 18 | so manually move them: 19 | 20 | * .gitignore 21 | * LICENSE.txt 22 | * PRIVACY.md 23 | * README.md 24 | * ic_launcher-web.png 25 | * proguard-project.txt 26 | 27 | Moved Files: 28 | ------------ 29 | Android Gradle projects use a different directory structure than ADT 30 | Eclipse projects. Here's how the projects were restructured: 31 | 32 | * AndroidManifest.xml => TutyFrutySlotForAndroid\src\main\AndroidManifest.xml 33 | * assets\ => TutyFrutySlotForAndroid\src\main\assets\ 34 | * res\ => TutyFrutySlotForAndroid\src\main\res\ 35 | * src\ => TutyFrutySlotForAndroid\src\main\java\ 36 | 37 | Next Steps: 38 | ----------- 39 | You can now build the project. The Gradle project needs network 40 | connectivity to download dependencies. 41 | 42 | Bugs: 43 | ----- 44 | If for some reason your project does not build, and you determine that 45 | it is due to a bug or limitation of the Eclipse to Gradle importer, 46 | please file a bug at http://b.android.com with category 47 | Component-Tools. 48 | 49 | (This import summary is for your information only, and can be deleted 50 | after import once you are satisfied with the results.) 51 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | 17 | 20 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 34 | 37 | 38 | 42 | 45 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /PRIVACY.md: -------------------------------------------------------------------------------- 1 | **Privacy Policy** 2 | 3 | Tuty Fruty Slot is committed to safeguarding the privacy of children who use our app. We understand the importance of protecting the information provided by children under the age of 13 ("Child" or "Children") and maintaining their trust. 4 | 5 | **Information Collection** 6 | 7 | We do not knowingly collect any personally identifiable information from children under the age of 13 without obtaining verifiable parental consent. In the event that we discover that we have collected personal information from a child without parental consent, we will promptly take steps to delete that information. 8 | 9 | **Types of Information Collected** 10 | 11 | - **Usage Information:** We may collect non-personal information about the ways Children use our app, such as interactions, preferences, and device information. This information is used solely for improving our app and ensuring a better user experience. 12 | 13 | - **Cookies and Tracking:** We do not use cookies or any tracking mechanisms specifically aimed at children. 14 | 15 | **Parental Rights** 16 | 17 | Parents or legal guardians can review the personal information provided by their children, request to delete the information, and refuse to allow any further collection or use of their child's information. Please contact us at velbazhd.software@gmail.com for any inquiries or requests regarding your child's information. 18 | 19 | **Security Measures** 20 | 21 | We employ reasonable security measures to protect the information provided by children under 13 from unauthorized access, disclosure, alteration, or destruction. 22 | 23 | **Updates to this Privacy Policy** 24 | 25 | We reserve the right to update or change our Privacy Policy at any time. Any modifications will be effective immediately upon posting. We encourage parents to review this Privacy Policy periodically to stay informed about how we are protecting children's information. 26 | 27 | **Contact Us** 28 | 29 | If you have any questions or concerns about our Privacy Policy, please contact us at velbazhd.software@gmail.com. 30 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/ReelsBase.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Basic data structures for reels. 25 | * 26 | * @author Todor Balabanov 27 | * 28 | * @email tdb@tbsoft-bg.com 29 | * 30 | * @date 09 Oct 2008 31 | */ 32 | interface ReelsBase { 33 | /** 34 | * Number of rows constant. 35 | */ 36 | public static final int ROWS = 3; 37 | 38 | /** 39 | * Number of columns constant. 40 | */ 41 | public static final int COLS = 5; 42 | } 43 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/SplashActivity.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | import java.util.Timer; 4 | import java.util.TimerTask; 5 | 6 | import android.app.Activity; 7 | import android.content.Intent; 8 | import android.content.pm.PackageManager; 9 | import android.os.Bundle; 10 | import android.webkit.WebView; 11 | import android.widget.Toast; 12 | 13 | public class SplashActivity extends Activity { 14 | 15 | private long timeout = 0L; 16 | 17 | private String redirect = ""; 18 | 19 | @Override 20 | protected void onCreate(Bundle savedInstanceState) { 21 | super.onCreate(savedInstanceState); 22 | setContentView(R.layout.activity_splash); 23 | 24 | /* 25 | * Activate JavaScript. 26 | */ 27 | ((WebView) findViewById(R.id.ads)).getSettings().setJavaScriptEnabled( 28 | true); 29 | 30 | /* 31 | * Load local web page as banner holder. 32 | */ 33 | ((WebView) findViewById(R.id.ads)) 34 | .loadUrl("file:///android_asset/banner.html"); 35 | 36 | /* 37 | * Get splash screen timeout. 38 | */ 39 | try { 40 | timeout = getPackageManager().getActivityInfo( 41 | this.getComponentName(), 42 | PackageManager.GET_ACTIVITIES 43 | | PackageManager.GET_META_DATA).metaData.getInt( 44 | "timeout", 0); 45 | } catch (Exception e) { 46 | timeout = 0; 47 | } 48 | 49 | /* 50 | * Get redirect activity class name. 51 | */ 52 | try { 53 | redirect = getPackageManager().getActivityInfo( 54 | this.getComponentName(), 55 | PackageManager.GET_ACTIVITIES 56 | | PackageManager.GET_META_DATA).metaData 57 | .getString("redirect"); 58 | } catch (Exception e) { 59 | redirect = this.getClass().toString(); 60 | Toast.makeText( 61 | this, 62 | getResources().getString( 63 | R.string.redirect_activity_is_missing_message), 64 | Toast.LENGTH_LONG).show(); 65 | } 66 | } 67 | 68 | @Override 69 | protected void onResume() { 70 | super.onResume(); 71 | 72 | new Timer().schedule(new TimerTask() { 73 | public void run() { 74 | try { 75 | startActivity(new Intent(SplashActivity.this, Class 76 | .forName(redirect))); 77 | } catch (Exception e) { 78 | } 79 | } 80 | }, timeout); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/ReelSymbol.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Holds information for reel symbol. 25 | * 26 | * @author Stanislav Petrov 27 | * 28 | * @email devilfighter1806@gmail.com 29 | * 30 | * @date 27 Oct 2008 31 | */ 32 | class ReelSymbol { 33 | 34 | /** 35 | * Name of reel symbol. Plus one for null at the end. 36 | */ 37 | private String name; 38 | 39 | /** 40 | * Reel symbol constructor. 41 | * 42 | * @param name 43 | * Name to be set. Plus one for null at the end. 44 | * 45 | * @author Stanislav Petrov 46 | * 47 | * @email devilfighter1806@gmail.com 48 | * 49 | * @date 27 Oct 2008 50 | */ 51 | public ReelSymbol(final String name) { 52 | this.name = name; 53 | } 54 | 55 | /** 56 | * Reel symbol name getter. 57 | * 58 | * @return Reel symbol name. 59 | * 60 | * @author Stanislav Petrov 61 | * 62 | * @email devilfighter1806@gmail.com 63 | * 64 | * @date 27 Oct 2008 65 | */ 66 | public String getName() { 67 | return name; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/GameConfig.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Implement the logic of Game simulation. Control configuration which manage 25 | * the game. Contain static variable which take care for turning on the 26 | * simulation. 27 | * 28 | * @author Darina Evtimova 29 | * 30 | * @email aleks_f@abv.bg 31 | * 32 | * @date 02 Oct 2008 33 | */ 34 | class GameConfig { 35 | 36 | /** 37 | * Text mode constant. 38 | */ 39 | public static final int TEXT_MODE = 1; 40 | 41 | /** 42 | * Graphic mode constant. 43 | */ 44 | public static final int GRAPHIC_MODE = 2; 45 | 46 | /** 47 | * Game vizualization mode. 48 | */ 49 | public static int videoMode; 50 | 51 | /** 52 | * Control game simulation. 53 | */ 54 | public static boolean simulation; 55 | 56 | /** 57 | * Changes value of the variable that controls game simulation. 58 | * 59 | * @author Qna Dimova 60 | * 61 | * @email q.dimova@gmail.com 62 | * 63 | * @date 26 Oct 2008 64 | */ 65 | public static void switchSimulation() { 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/PayTableScreen.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Implement logic of pay table screen drawing. 25 | * 26 | * @author Darina Evtimova 27 | * 28 | * @email aleks_f@abv.bg 29 | * 30 | * @date 06 Oct 2008 31 | */ 32 | class PayTableScreen { 33 | 34 | /** 35 | * Takes bet value for calculating the pay table screen. 36 | */ 37 | private Bet bet; 38 | 39 | /** 40 | * Takes number of selected lines for calculating the pay table screen. 41 | */ 42 | private LinesSelector selector; 43 | 44 | /** 45 | * Constructor. Takes care of initialization of pay table canvas, pay table 46 | * bet and pay table lines selector. 47 | * 48 | * @param canvas 49 | * Visual components in pay table screen will be drawn on text 50 | * canvas. 51 | * 52 | * @param game 53 | * Contain value of bet and number of selected lines. 54 | * 55 | * @author Darina Evtimova 56 | * 57 | * @email aleks_f@abv.bg 58 | * 59 | * @date 26 Oct 2008 60 | */ 61 | public PayTableScreen(GameScreen game) { 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/LinesSelected.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Implements lines selected component. The component shows to the player how 25 | * many lines are selected. Selected lines are these lines on which player can 26 | * win depending on the number of meetings of symbols over the line. Player can 27 | * change the number of selected lines. Holds the counter which shows how many 28 | * lines are selected. 29 | * 30 | * @author Stanislav Petrov 31 | * 32 | * @email devilfighter1806@gmail.com 33 | * 34 | * @date 10 Sep 2008 35 | */ 36 | class LinesSelected { 37 | 38 | /** 39 | * Lines selector pointer. 40 | */ 41 | private LinesSelector selector; 42 | 43 | /** 44 | * Constructor. 45 | * 46 | * @param linesSelector 47 | * Lines selector as source of data. 48 | * 49 | * @author Todor Balabanov 50 | * 51 | * @email tdb@tbsoft-bg.com 52 | * 53 | * @date 09 Oct 2008 54 | */ 55 | public LinesSelected(LinesSelector selector) { 56 | this.selector = selector; 57 | } 58 | 59 | /** 60 | * Lines selector pointer getter. 61 | * 62 | * @return Lines selecltor pointer. 63 | * 64 | * @author Stanislav Petrov 65 | * 66 | * @email devilfighter1806@gmail.com 67 | * 68 | * @date 10 Sep 2008 69 | */ 70 | public LinesSelector getSelector() { 71 | return selector; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%"=="" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%"=="" set DIRNAME=. 29 | @rem This is normally unused 30 | set APP_BASE_NAME=%~n0 31 | set APP_HOME=%DIRNAME% 32 | 33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 35 | 36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 38 | 39 | @rem Find java.exe 40 | if defined JAVA_HOME goto findJavaFromJavaHome 41 | 42 | set JAVA_EXE=java.exe 43 | %JAVA_EXE% -version >NUL 2>&1 44 | if %ERRORLEVEL% equ 0 goto execute 45 | 46 | echo. 47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 48 | echo. 49 | echo Please set the JAVA_HOME variable in your environment to match the 50 | echo location of your Java installation. 51 | 52 | goto fail 53 | 54 | :findJavaFromJavaHome 55 | set JAVA_HOME=%JAVA_HOME:"=% 56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 57 | 58 | if exist "%JAVA_EXE%" goto execute 59 | 60 | echo. 61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 62 | echo. 63 | echo Please set the JAVA_HOME variable in your environment to match the 64 | echo location of your Java installation. 65 | 66 | goto fail 67 | 68 | :execute 69 | @rem Setup the command line 70 | 71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 72 | 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if %ERRORLEVEL% equ 0 goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | set EXIT_CODE=%ERRORLEVEL% 85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 87 | exit /b %EXIT_CODE% 88 | 89 | :mainEnd 90 | if "%OS%"=="Windows_NT" endlocal 91 | 92 | :omega 93 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/PayoutPercent.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Calculating pay out percent. 25 | * 26 | * @author Anton Dimitrov 27 | * 28 | * @email anton.naskov@gmail.com 29 | * 30 | * @date 13 Oct 2008 31 | */ 32 | class PayoutPercent { 33 | 34 | /** 35 | * Sum all bets which player has done. 36 | */ 37 | private long sumBet; 38 | 39 | /** 40 | * Sum all wins which player has done. 41 | */ 42 | private long sumWin; 43 | 44 | /** 45 | * Pay out percent value. 46 | */ 47 | private double value; 48 | 49 | /** 50 | * Update pay out percent value. 51 | * 52 | * @author Anton Dimitrov 53 | * 54 | * @email anton.naskov@gmail.com 55 | * 56 | * @date 13 Oct 2008 57 | */ 58 | private void update() { 59 | } 60 | 61 | /** 62 | * Reset sum win, sum bet and pay out percent value. 63 | * 64 | * @author Anton Dimitrov 65 | * 66 | * @email anton.naskov@gmail.com 67 | * 68 | * @date 13 Oct 2008 69 | */ 70 | public void reset() { 71 | } 72 | 73 | /** 74 | * Increase the sum of bet. 75 | * 76 | * @author Anton Dimitrov 77 | * 78 | * @email anton.naskov@gmail.com 79 | * 80 | * @date 13 Oct 2008 81 | */ 82 | public void increaseSumBet(long sumBet) { 83 | } 84 | 85 | /** 86 | * Increase the sum of win. 87 | * 88 | * @author Anton Dimitrov 89 | * 90 | * @email anton.naskov@gmail.com 91 | * 92 | * @date 13 Oct 2008 93 | */ 94 | public void increaseSumWin(long sumWin) { 95 | } 96 | 97 | /** 98 | * Pay out percent value getter. 99 | * 100 | * @author Anton Dimitrov 101 | * 102 | * @email anton.naskov@gmail.com 103 | * 104 | * @date 13 Oct 2008 105 | */ 106 | public double getValue() { 107 | return 0.0; 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/TotalBet.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Implements logic of the total bet. Holds bet value per line. Holds selected 25 | * lines and their number. Holds total bet value and updates total bet value. 26 | * The total bet value is calculated by multiplying number of lines and bet 27 | * value per line. 28 | * 29 | * @author Qna Dimova 30 | * 31 | * @email q.dimova@gmail.com 32 | * 33 | * @date 11 Sep 2008 34 | */ 35 | class TotalBet { 36 | 37 | /** 38 | * Bet pointer. 39 | */ 40 | private Bet bet; 41 | 42 | /** 43 | * Lines selected pointer. 44 | */ 45 | private LinesSelected lines; 46 | 47 | /** 48 | * Value of total bet. 49 | */ 50 | private long value; 51 | 52 | /** 53 | * Constructor. 54 | * 55 | * @param bet 56 | * Source for bet value. 57 | * 58 | * @param lines 59 | * Source for number of lines. 60 | * 61 | * @author Stanislav Petrov 62 | * 63 | * @email devilifighter1806@gmail.com 64 | * 65 | * @date 09 Oct 2008 66 | */ 67 | public TotalBet(Bet bet, LinesSelected lines) { 68 | this.bet = bet; 69 | this.lines = lines; 70 | update(); 71 | } 72 | 73 | /** 74 | * Value of a total bet getter. 75 | * 76 | * @return Value of a total bet. 77 | * 78 | * @author Anton Dimitrov 79 | * 80 | * @email anton.naskov@gmail.com 81 | * 82 | * @date 11 Sep 2008 83 | */ 84 | public long getValue() { 85 | return value; 86 | } 87 | 88 | /** 89 | * Update total bet value. Total bet value depends on bet value per line and 90 | * number of selected lines. 91 | * 92 | * @author Anton Dimitrov 93 | * 94 | * @email anton.naskov@gmail.com 95 | * 96 | * @date 11 Sep 2008 97 | */ 98 | public void update() { 99 | value = bet.getValue() * lines.getSelector().numberOfSelectedLines(); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/Bet.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Implements logic of the bet per line. Player sets bet value. Bet value is 25 | * limited by minimal and maximal bet. This bet value can be incremented. 26 | * Incremention is done by fixed value. This bet per line takes part for 27 | * calculating the total bet. 28 | * 29 | * @author Qna Dimova 30 | * 31 | * @email q.dimova@gmail.com 32 | * 33 | * @date 10 Sep 2008 34 | */ 35 | class Bet { 36 | /** 37 | * Bet value per line. 38 | */ 39 | private long value; 40 | 41 | /** 42 | * Minimal bet constant. 43 | */ 44 | public static final long MIN_BET = 1; 45 | 46 | /** 47 | * Maximal bet constant. 48 | */ 49 | public static final long MAX_BET = 10; 50 | 51 | /** 52 | * Increasing bet step constant. 53 | */ 54 | public static final long BET_STEP = 1; 55 | 56 | public Bet() { 57 | value = MIN_BET; 58 | } 59 | 60 | /** 61 | * Value getter. 62 | * 63 | * @return Value of bet. 64 | * 65 | * @author Anton Dimitrov 66 | * 67 | * @email anton.naskov@gmail.com 68 | * 69 | * @date 10 Sep 2008 70 | */ 71 | public long getValue() { 72 | return value; 73 | } 74 | 75 | /** 76 | * Value setter. 77 | * 78 | * @param value 79 | * Value of bet. 80 | * 81 | * @author Anton Dimitrov 82 | * 83 | * @email anton.naskov@gmail.com 84 | * 85 | * @date 10 Sep 2008 86 | */ 87 | public void setValue(final long value) { 88 | this.value = value; 89 | } 90 | 91 | /** 92 | * Increment bet value. Incremention is done by fixed size bet step. Bet 93 | * step is the value of credits with which the user change the bet value. 94 | * When bet value is greater than maximum bet value, it sets minimal bet 95 | * value. 96 | * 97 | * @author Anton Dimitrov 98 | * 99 | * @email anton.naskov@gmail.com 100 | * 101 | * @date 10 Sep 2008 102 | */ 103 | public void cycleIncrement() { 104 | value += BET_STEP; 105 | 106 | if (value > MAX_BET) { 107 | value = MIN_BET; 108 | } 109 | } 110 | 111 | public void maximum() { 112 | value = MAX_BET; 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/Credit.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Implements logic of the credits. Player has credits to set bet value per 25 | * line. Gives information to player about the credit amount he has. Credit is 26 | * incremented when player puts some cash for additional credit. When the player 27 | * bets a value per line the credit is decremented with the relevant amount. 28 | * 29 | * @author Qna Dimova 30 | * 31 | * @email q.dimova@gmail.com 32 | * 33 | * @date 11 Sep 2008 34 | */ 35 | class Credit { 36 | 37 | /** 38 | * Credit value. 39 | */ 40 | private long value = 0; 41 | 42 | /** 43 | * Credit value getter. 44 | * 45 | * @return Value of credit. 46 | * 47 | * @author Anton Dimitrov 48 | * 49 | * @email anton.naskov@gmail.com 50 | * 51 | * @date 11 Sep 2008 52 | */ 53 | public long getValue() { 54 | return value; 55 | } 56 | 57 | /** 58 | * Credit value setter. 59 | * 60 | * @param value 61 | * Value of credit. 62 | * 63 | * @author Anton Dimitrov 64 | * 65 | * @email anton.naskov@gmail.com 66 | * 67 | * @date 11 Sep 2008 68 | */ 69 | public void setValue(final long value) { 70 | this.value = value; 71 | } 72 | 73 | /** 74 | * Increment credit value. Incrementation is done by amount. Amount is a 75 | * cash which player puts in the slot machine. 76 | * 77 | * @param amount 78 | * Value with which player increment the credit value. 79 | * 80 | * @author Anton Dimitrov 81 | * 82 | * @email anton.naskov@gmail.com 83 | * 84 | * @date 11 Sep 2008 85 | */ 86 | public void increment(final long amount) { 87 | value += amount; 88 | } 89 | 90 | /** 91 | * Decrements credit value. Decrementation is done by amount. Amount is cash 92 | * when player takes credits when he wants to get the won credits or when he 93 | * wants to bet. 94 | * 95 | * @param amount 96 | * 97 | * @author Anton Dimitrov 98 | * 99 | * @email anton.naskov@gmail.com 100 | * 101 | * @date 11 Sep 2008 102 | */ 103 | public void decrement(final long amount) { 104 | value -= amount; 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/PayTable.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Implements logic of pay table. Fills pay table with different pay table 25 | * entries and hold its contents. Summarize pay out values for all type symbols. 26 | * Defines the pay out rules for player and how much credits he gets when he 27 | * wins. Holds fiexed size number of pay table entries. 28 | * 29 | * @author Stanislav Petrov 30 | * 31 | * @email devilfighter1806@gmail.com 32 | * 33 | * @date 15 Sep 2008 34 | */ 35 | class PayTable { 36 | 37 | /** 38 | * Number of entries. 39 | */ 40 | public static final int NUMBER_OF_ENTRIES = Prizes.NUMBER_OF_COMBINATIONS; 41 | 42 | /** 43 | * Entry for pay table initializing. 44 | */ 45 | private PayTableEntry entries[] = new PayTableEntry[NUMBER_OF_ENTRIES]; 46 | 47 | /** 48 | * Default constructor. 49 | * 50 | * @author Darina Evtimova 51 | * 52 | * @email aleks_f@abv.bg 53 | * 54 | * @date 18 Sep 2008 55 | */ 56 | public PayTable() { 57 | } 58 | 59 | /** 60 | * Constructor. 61 | * 62 | * @param entries 63 | * Array from PayTableEntry. 64 | * 65 | * @author Darina Evtimova 66 | * 67 | * @email aleks_f@abv.bg 68 | * 69 | * @date 18 Sep 2008 70 | */ 71 | public PayTable(PayTableEntry entries[]) { 72 | for (int i = 0; i < NUMBER_OF_ENTRIES; i++) { 73 | this.entries[i] = entries[i]; 74 | } 75 | } 76 | 77 | /** 78 | * Entry getter. 79 | * 80 | * @param index 81 | * Shows the entry of the array that will be taken 82 | * 83 | * @return Pay table entry. 84 | * 85 | * @author Anton Dimitrov 86 | * 87 | * @email anton.naskov@gmail.com 88 | * 89 | * @date 15 Sep 2008 90 | */ 91 | public PayTableEntry getEntry(int index) { 92 | return entries[index]; 93 | } 94 | 95 | /** 96 | * Entry setter. 97 | * 98 | * @param entry 99 | * Entry which is set. 100 | * 101 | * @param index 102 | * Position in array, where entry should be set. 103 | * 104 | * @author Anton Dimitrov 105 | * 106 | * @email anton.naskov@gmail.com 107 | * 108 | * @date 15 Sep 2008 109 | */ 110 | public void setEntry(PayTableEntry entry, int index) { 111 | this.entries[index] = entry; 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/PayTableEntry.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Implements logic of pay table entry. Each pay table entry contains 25 | * information about type of symbol, number of meetings of this symbol and pay 26 | * out values depending on the number of times the symbol is repeated in the 27 | * line. Besides pay out values for symbols are calculated from bet value per 28 | * line,number of selected lines and symobol's coefficient. 29 | * 30 | * @author Anton Dimitrov 31 | * 32 | * @email anton.naskov@gmail.com 33 | * 34 | * @date 15 Sep 2008 35 | */ 36 | class PayTableEntry { 37 | 38 | /** 39 | * Prize combination flag. 40 | */ 41 | private PrizeCombination prizeCombination = null; 42 | 43 | /** 44 | * Value, calculated from bet per line and number of lines with a special 45 | * function. 46 | */ 47 | private long value = 0; 48 | 49 | /** 50 | * Default constructor. 51 | * 52 | * @author Stanislav Petrov 53 | * 54 | * @email devilfighter1806@gmail.com 55 | * 56 | * @date 18 Sep 2008 57 | */ 58 | public PayTableEntry() { 59 | } 60 | 61 | /** 62 | * Constructor. 63 | * 64 | * @author Stanislav Petrov 65 | * 66 | * @email devilfighter1806@gmail.com 67 | * 68 | * @date 18 Sep 2008 69 | */ 70 | public PayTableEntry(final PrizeCombination prizeCombination, long value) { 71 | this.prizeCombination = prizeCombination; 72 | this.value = value; 73 | } 74 | 75 | /** 76 | * Prize combination getter. 77 | * 78 | * @return Prize combination flag. 79 | * 80 | * @author Anton Dimitrov 81 | * 82 | * @email anton.naskov@gmail.com 83 | * 84 | * @date 15 Sep 2008 85 | */ 86 | public final PrizeCombination getPrizeCombination() { 87 | return prizeCombination; 88 | } 89 | 90 | /** 91 | * Prize combination setter. 92 | * 93 | * @param prizeCombination 94 | * Prize combination flag. 95 | * 96 | * @author Anton Dimitrov 97 | * 98 | * @email anton.naskov@gmail.com 99 | * 100 | * @date 15 Sep 2008 101 | */ 102 | public void setPrizeCombination(final PrizeCombination prizeCombination) { 103 | this.prizeCombination = prizeCombination; 104 | } 105 | 106 | /** 107 | * Value getter. 108 | * 109 | * @return Value, calculated from bet per line and number of lines. 110 | * 111 | * @author Anton Dimitrov 112 | * 113 | * @email anton.naskov@gmail.com 114 | * 115 | * @date 15 Sep 2008 116 | */ 117 | public long getValue() { 118 | return value; 119 | } 120 | 121 | /** 122 | * Value setter. 123 | * 124 | * @param value 125 | * Value, calculated from bet per line and number of lines. 126 | * 127 | * @author Anton Dimitrov 128 | * 129 | * @email anton.naskov@gmail.com 130 | * 131 | * @date 15 Sep 2008 132 | */ 133 | public void setValue(final long value) { 134 | this.value = value; 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/Combination.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Implements logic of the lines, on which player will play. Combination shows 25 | * how exactly a line is built. When player choose a line to play on, 26 | * combination knows how exactly the line is represented on the visible part of 27 | * the reels. Check if two combinations are the same. 28 | * 29 | * @author Qna Dimova 30 | * 31 | * @email q.dimova@gmail.com 32 | * 33 | * @date 08 Sep 2008 34 | */ 35 | class Combination { 36 | /** 37 | * Holds information about how a line is built. 38 | */ 39 | private char mask[][] = new char[ReelsBase.COLS][ReelsBase.ROWS]; 40 | 41 | /** 42 | * Default constructor. 43 | * 44 | * @author Anton Dimitrov 45 | * 46 | * @email anton.naskov@gmail.com 47 | * 48 | * @date 15 Sep 2008 49 | */ 50 | public Combination() { 51 | } 52 | 53 | /** 54 | * Constructor. 55 | * 56 | * @param mask 57 | * Line container. 58 | * 59 | * @author Anton Dimitrov 60 | * 61 | * @email anton.naskov@gmail.com 62 | * 63 | * @date 15 Sep 2008 64 | */ 65 | public Combination(char mask[][]) { 66 | for (int i = 0; i < ReelsBase.COLS; i++) { 67 | for (int j = 0; j < ReelsBase.ROWS; j++) { 68 | this.mask[i][j] = mask[i][j]; 69 | } 70 | } 71 | } 72 | 73 | /** 74 | * Bit mask getter. 75 | * 76 | * @return Mask that indicates the line. 77 | * 78 | * @author Anton Dimitrov 79 | * 80 | * @email anton.naskov@gmail.com 81 | * 82 | * @date 08 Sep 2008 83 | */ 84 | public char[][] getMask() { 85 | char mask[][] = new char[ReelsBase.COLS][ReelsBase.ROWS]; 86 | 87 | for (int i = 0; i < ReelsBase.COLS; i++) { 88 | for (int j = 0; j < ReelsBase.ROWS; j++) { 89 | mask[i][j] = this.mask[i][j]; 90 | } 91 | } 92 | 93 | return mask; 94 | } 95 | 96 | /** 97 | * Bit mask setter. 98 | * 99 | * @param mask 100 | * The mask to set. 101 | * 102 | * @author Qna Dimova 103 | * 104 | * @email q.dimova@gmail.com 105 | * 106 | * @date 08 Sep 2008 107 | */ 108 | public void setMask(final char mask[][]) { 109 | for (int i = 0; i < ReelsBase.COLS; i++) { 110 | for (int j = 0; j < ReelsBase.ROWS; j++) { 111 | this.mask[i][j] = mask[i][j]; 112 | } 113 | } 114 | } 115 | 116 | /** 117 | * Compare two combinations. 118 | * 119 | * @param combination 120 | * External combination to be compared with the internal 121 | * combination. 122 | * 123 | * @return True if combinations are equal, false - otherwise. 124 | * 125 | * @author Stanislav Petrov 126 | * 127 | * @email devilfighter1806@gmail.com 128 | * 129 | * @date 02 Sep 2008 130 | */ 131 | public boolean equals(final Combination combination) { 132 | for (int i = 0; i < ReelsBase.COLS; i++) { 133 | for (int j = 0; j < ReelsBase.ROWS; j++) { 134 | if (this.mask[i][j] != combination.mask[i][j]) { 135 | return false; 136 | } 137 | } 138 | } 139 | 140 | return true; 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/PrizesFrequency.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Implements logic of calculating frequency of prizes. 25 | * 26 | * @author Darina Evtimova 27 | * 28 | * @email aleks_f@abv.bg 29 | * 30 | * @date 14 Oct 2008 31 | */ 32 | class PrizesFrequency { 33 | 34 | /** 35 | * Maximum number of prizes. 36 | */ 37 | public static final int MAX_NUMBER_OF_PRIZES = 1000; 38 | 39 | /** 40 | * Size of prizes names. 41 | */ 42 | public static final int SIZE_OF_PRIZES_NAMES = 100; 43 | 44 | /** 45 | * Number of prizes under frequency test. 46 | */ 47 | private int numberOfPrizes; 48 | 49 | /** 50 | * List of the prizes under frequency test. 51 | */ 52 | private char prizes[][] = new char[MAX_NUMBER_OF_PRIZES][SIZE_OF_PRIZES_NAMES]; 53 | 54 | /** 55 | * It contain count of frequencies. 56 | */ 57 | private long counters[] = new long[MAX_NUMBER_OF_PRIZES]; 58 | 59 | /** 60 | * Total number of spins. 61 | */ 62 | private long totalNumberOfSpins; 63 | 64 | /** 65 | * Default constructor. 66 | * 67 | * @author Darina Evtimova 68 | * 69 | * @email aleks_f@abv.bg 70 | * 71 | * @date 14 Oct 2008 72 | */ 73 | public PrizesFrequency() { 74 | } 75 | 76 | /** 77 | * Initialize with zeros all counters. 78 | * 79 | * @author Darina Evtimova 80 | * 81 | * @email aleks_f@abv.bg 82 | * 83 | * @date 14 Oct 2008 84 | */ 85 | public void reset() { 86 | } 87 | 88 | /** 89 | * Increment frequency of given prize. 90 | * 91 | * @param name 92 | * Name of the prize which frequency should be increment. 93 | * 94 | * @author Anton Dimitrov 95 | * 96 | * @email anton.naskov@gmail.com 97 | * 98 | * @date 14 Oct 2008 99 | */ 100 | public void increment(String name) { 101 | } 102 | 103 | /** 104 | * Increment number of spins. 105 | * 106 | * @author Anton Dimitrov 107 | * 108 | * @email anton.naskov@gmail.com 109 | * 110 | * @date 14 Oct 2008 111 | */ 112 | public void incrementSpins() { 113 | } 114 | 115 | /** 116 | * Number of spins getter. 117 | * 118 | * @return Total number of spins. 119 | * 120 | * @author Anton Dimitrov 121 | * 122 | * @email anton.naskov@gmail.com 123 | * 124 | * @date 15 Oct 2008 125 | */ 126 | public long getTotalNumberOfSpins() { 127 | return 0; 128 | } 129 | 130 | /** 131 | * Sort prizes frequencies by name. 132 | * 133 | * @author Qna Dimova 134 | * 135 | * @email q.dimova@gmail.com 136 | * 137 | * @date 17 Oct 2008 138 | */ 139 | public void sortByName() { 140 | } 141 | 142 | /** 143 | * Sort prizes frequencies by frequencies. 144 | * 145 | * @author Darina Evtimova 146 | * 147 | * @email aleks_f@abv.bg 148 | * 149 | * @date 17 Oct 2008 150 | */ 151 | public void sortByFrequency() { 152 | } 153 | 154 | /** 155 | * Print frequencies. 156 | * 157 | * @author Anton Dimitrov 158 | * 159 | * @email anton.naskov@gmail.com 160 | * 161 | * @date 14 Oct 2008 162 | */ 163 | public void print() { 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/GameScreen.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Presents game play screen. Constructing and initialize all visual components 25 | * which are part of the screen. It contains information about all 26 | * xy-coordinates of game components and their width and height. Takes care of 27 | * selecting lines, changing the bet, adding credit. It responds to spinning the 28 | * reels. 29 | * 30 | * @author Anton Dimitrov 31 | * 32 | * @email anton.naskov@gmail.com 33 | * 34 | * @date 06 Oct 2008 35 | */ 36 | class GameScreen { 37 | 38 | /** 39 | * Visual reels component. 40 | */ 41 | protected Reels reels = null; 42 | 43 | /** 44 | * Visual lines selector component. 45 | */ 46 | protected LinesSelector selector = null; 47 | 48 | /** 49 | * Visual component which shows bet value. 50 | */ 51 | protected Bet bet = null; 52 | 53 | /** 54 | * Visual component which shows how many lines are selected. 55 | */ 56 | protected LinesSelected lines = null; 57 | 58 | /** 59 | * Visual component which shows total bet value. 60 | */ 61 | protected TotalBet total = null; 62 | 63 | /** 64 | * Visual component which shows how many credits are won. 65 | */ 66 | protected WinnerPaid paid = null; 67 | 68 | /** 69 | * Visual components which shows credit. 70 | */ 71 | protected Credit credit = null; 72 | 73 | /** 74 | * Constructor. 75 | * 76 | * @param canvas 77 | * Visual components in game screen will be drawn on text canvas. 78 | * 79 | * @author Anton Dimitrov 80 | * 81 | * @email anton.naskov@gmail.com 82 | * 83 | * @date 06 Oct 2008 84 | */ 85 | public GameScreen() { 86 | reels = new Reels(); 87 | selector = new LinesSelector(); 88 | bet = new Bet(); 89 | lines = new LinesSelected(selector); 90 | total = new TotalBet(bet, lines); 91 | paid = new WinnerPaid(bet, selector, reels); 92 | credit = new Credit(); 93 | } 94 | 95 | public Reels getReels() { 96 | return reels; 97 | } 98 | 99 | public void setReels(Reels reels) { 100 | this.reels = reels; 101 | } 102 | 103 | public LinesSelected getLines() { 104 | return lines; 105 | } 106 | 107 | public void setLines(LinesSelected lines) { 108 | this.lines = lines; 109 | } 110 | 111 | public TotalBet getTotal() { 112 | return total; 113 | } 114 | 115 | public void setTotal(TotalBet total) { 116 | this.total = total; 117 | } 118 | 119 | public WinnerPaid getPaid() { 120 | return paid; 121 | } 122 | 123 | public void setPaid(WinnerPaid paid) { 124 | this.paid = paid; 125 | } 126 | 127 | public Credit getCredit() { 128 | return credit; 129 | } 130 | 131 | public void setCredit(Credit credit) { 132 | this.credit = credit; 133 | } 134 | 135 | public void setSelector(LinesSelector selector) { 136 | this.selector = selector; 137 | } 138 | 139 | public void setBet(Bet bet) { 140 | this.bet = bet; 141 | } 142 | 143 | /** 144 | * Bet getter. 145 | * 146 | * @return bet Bet pointer. 147 | * 148 | * @author Qna Dimova 149 | * 150 | * @email q.dimova@gmail.com 151 | * 152 | * @date 26 Oct 2008 153 | */ 154 | public Bet getBet() { 155 | return bet; 156 | } 157 | 158 | /** 159 | * Lines selector getter. 160 | * 161 | * @return selector Lines selector pointer. 162 | * 163 | * @author Darina Evtimova 164 | * 165 | * @email aleks_f@abv.bg 166 | * 167 | * @date 26 Oct 2008 168 | */ 169 | public LinesSelector getSelector() { 170 | return selector; 171 | } 172 | 173 | /** 174 | * User changed number of lines from the outside world. 175 | * 176 | * @author Todor Balabanov 177 | * 178 | * @email tdb@tbsoft-bg.com 179 | * 180 | * @date 08 Oct 2008 181 | */ 182 | public void numberOfLinesChange() { 183 | selector.linesUp(); 184 | total.update(); 185 | } 186 | 187 | /** 188 | * User changed bet from the outside world. 189 | * 190 | * @author Todor Balabanov 191 | * 192 | * @email tdb@tbsoft-bg.com 193 | * 194 | * @date 08 Oct 2008 195 | */ 196 | public void betChange() { 197 | bet.cycleIncrement(); 198 | total.update(); 199 | } 200 | 201 | /** 202 | * 203 | */ 204 | public void maxBetChange() { 205 | bet.maximum(); 206 | selector.maximum(); 207 | total.update(); 208 | } 209 | 210 | /** 211 | * User added credit from the outside world. 212 | * 213 | * @param amount 214 | * Amount to be added. 215 | * 216 | * @author Todor Balabanov 217 | * 218 | * @email tdb@tbsoft-bg.com 219 | * 220 | * @date 08 Oct 2008 221 | */ 222 | public void addCredit(final long amount) { 223 | credit.increment(amount); 224 | } 225 | 226 | /** 227 | * Spin reels components on the game screen. 228 | * 229 | * @author Stanislav Petrov 230 | * 231 | * @email devilfighter1806@gmail.com 232 | * 233 | * @date 09 Oct 2008 234 | */ 235 | public void spinReels() { 236 | /* 237 | * User is able to spin only with enough credit. 238 | */ 239 | if (credit.getValue() >= total.getValue()) { 240 | /* 241 | * Take bet from the credit before to spin the reels. 242 | */ 243 | credit.decrement(total.getValue()); 244 | 245 | reels.spin(); 246 | 247 | /* 248 | * Winner paid can be changed faster and because of this win should 249 | * be written in temporary variable. 250 | */ 251 | long money = paid.calculateWin(); 252 | paid.setValue(money); 253 | addCredit(money); 254 | } else { 255 | // TODO Write not enough credit message. 256 | } 257 | } 258 | } 259 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/WinnerPaid.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Implements logic of winner's paid value. Shows how many credits player takes 25 | * when he met prize combinations in the game. Calculates the win. 26 | * 27 | * @author Stanislav Petrov 28 | * 29 | * @email devilfighter1806@gmail.com 30 | * 31 | * @date 12 Sep 2008 32 | */ 33 | class WinnerPaid { 34 | 35 | /** 36 | * Paid value to winner. 37 | */ 38 | private long value; 39 | 40 | /** 41 | * Bet value used to calculate winner paid value. 42 | */ 43 | private Bet bet; 44 | 45 | /** 46 | * Source for selected lines. 47 | */ 48 | private LinesSelector selector; 49 | 50 | /** 51 | * Source for reels state. 52 | */ 53 | private Reels reels; 54 | 55 | /** 56 | * Pointers to all prizes already found. 57 | */ 58 | private final PrizeCombination found[] = new PrizeCombination[LinesSelector.LINES_AVAILABLE]; 59 | 60 | /** 61 | * Symbols part of the win. 62 | */ 63 | private char winSymbol[][] = new char[Reels.COLS][Reels.ROWS]; 64 | 65 | 66 | /** 67 | * Clear array with found pointers. 68 | * 69 | * @author Stanislav Petrov 70 | * 71 | * @email devilfighter1806@gmail.com 72 | * 73 | * @date 11 Oct 2008 74 | */ 75 | private void clearFound() { 76 | for (int i = 0; i < LinesSelector.LINES_AVAILABLE; i++) { 77 | found[i] = null; 78 | } 79 | 80 | for(int i=0; i. * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Implements prize combination of symbols. Holds type of symbol. Holds flag 25 | * which indicates selected line. Holds symbol's coefficient for defining pay 26 | * out values of a symbol. Holds the name of the prize combination. Check if two 27 | * prize combinations are the same. 28 | * 29 | * @author Qna Dimova 30 | * 31 | * @email q.dimova@gmail.com 32 | * 33 | * @date 09 Sep 2008 34 | */ 35 | class PrizeCombination { 36 | 37 | /** 38 | * Combination of symbols distribution. 39 | */ 40 | private Combination combination; 41 | 42 | /** 43 | * Symbol for checking the prize of combination. 44 | */ 45 | private ReelSymbol symbol; 46 | 47 | /** 48 | * Coefficient of the symbol frequence. 49 | */ 50 | private int coefficient; 51 | 52 | /** 53 | * Name of prize combination 54 | */ 55 | private String name; 56 | 57 | /** 58 | * Default constructor. 59 | * 60 | * @author Qna Dimova 61 | * 62 | * @email q.dimova@gmail.com 63 | * 64 | * @date 18 Sep 2008 65 | */ 66 | public PrizeCombination() { 67 | } 68 | 69 | /** 70 | * Constructor. 71 | * 72 | * @param combination 73 | * Combination of symbols. 74 | * 75 | * @param symbol 76 | * Symbol's flag. 77 | * 78 | * @param coefficient 79 | * Used in pay table. 80 | * 81 | * @param name 82 | * Symbols name 83 | * 84 | * @author Anton Dimitrov 85 | * 86 | * @email anton.naskov@gmail.com 87 | * 88 | * @date 15 Sep 2008 89 | */ 90 | public PrizeCombination(Combination combination, final ReelSymbol symbol, 91 | final int coefficient, final String name) { 92 | this.combination = combination; 93 | this.symbol = symbol; 94 | this.coefficient = coefficient; 95 | this.name = name; 96 | } 97 | 98 | /** 99 | * Combination of symbols getter. 100 | * 101 | * @return Combination of symbols. 102 | * 103 | * @author Qna Dimova 104 | * 105 | * @email q.dimova@gmail.com 106 | * 107 | * @date 09 Sep 2008 108 | */ 109 | public Combination getCombination() { 110 | return combination; 111 | } 112 | 113 | /** 114 | * Combination of symbols setter. 115 | * 116 | * @param combination 117 | * Combination to be set in the object. 118 | * 119 | * @author Stanislav Petrov 120 | * 121 | * @email devilfighter1806@gmail.com 122 | * 123 | * @date 09 Sep 2008 124 | */ 125 | public void setCombination(final Combination combination) { 126 | this.combination = combination; 127 | } 128 | 129 | /** 130 | * Symbol getter. 131 | * 132 | * @return Symbol, used for checking the prize combination. 133 | * 134 | * @author Qna Dimova 135 | * 136 | * @email q.dimova@gmail.com 137 | * 138 | * @date 09 Sep 2008 139 | */ 140 | public ReelSymbol getSymbol() { 141 | return symbol; 142 | } 143 | 144 | /** 145 | * Symbol setter. 146 | * 147 | * @param symbol 148 | * Symbol to be set in the object. 149 | * 150 | * @author Stanislav Petrov 151 | * 152 | * @email devilfighter1806@gmail.com 153 | * 154 | * @date 09 Sep 2008 155 | */ 156 | public void setSymbol(ReelSymbol symbol) { 157 | this.symbol = symbol; 158 | } 159 | 160 | /** 161 | * Symbol's coefficient getter. 162 | * 163 | * @return Symbol's coefficient. 164 | * 165 | * @author Qna Dimova 166 | * 167 | * @email q.dimova@gmail.com 168 | * 169 | * @date 09 Sep 2008 170 | */ 171 | public int getCoefficient() { 172 | return coefficient; 173 | } 174 | 175 | /** 176 | * Symbol's coefficient setter. 177 | * 178 | * @param coefficient 179 | * Coefficient to be set in the object. 180 | * 181 | * @author Stanislav Petrov 182 | * 183 | * @email devilfighter1806@gmail.com 184 | * 185 | * @date 09 Sep 2008 186 | */ 187 | public void setCoefficient(final int coefficient) { 188 | this.coefficient = coefficient; 189 | } 190 | 191 | /** 192 | * Name of prize combination getter. 193 | * 194 | * @return Name of prize combination pointer. 195 | * 196 | * @author Anton Dimitrov 197 | * 198 | * @email anton.naskov@gmail.com 199 | * 200 | * @date 02 Oct 2008 201 | */ 202 | public String getName() { 203 | return name; 204 | } 205 | 206 | /** 207 | * Name of prize combination setter. 208 | * 209 | * @param name 210 | * Name of prize combination. 211 | * 212 | * @author Anton Dimitrov 213 | * 214 | * @email anton.naskov@gmail.com 215 | * 216 | * @date 02 Oct 2008 217 | */ 218 | public void setName(final String name) { 219 | this.name = name; 220 | } 221 | 222 | /** 223 | * Compare two prize combinations. 224 | * 225 | * @param combination 226 | * External prize combination to be compared with the internal 227 | * prize combination. 228 | * 229 | * @return True if prize combinations are equal, false - otherwise. 230 | * 231 | * @author Stanislav Petrov 232 | * 233 | * @email devilfighter1806@gmail.com 234 | * 235 | * @date 02 Oct 2008 236 | */ 237 | public boolean equals(final PrizeCombination combination) { 238 | if (this.symbol != combination.symbol) { 239 | return false; 240 | } 241 | 242 | if (this.coefficient != combination.coefficient) { 243 | return false; 244 | } 245 | 246 | if (this.combination.equals(combination.combination) == false) { 247 | return false; 248 | } 249 | 250 | if (this.name.equals(combination.name) == false) { 251 | return false; 252 | } 253 | 254 | return true; 255 | } 256 | } 257 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/Reels.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | /******************************************************************************* 4 | * * 5 | * Tuty-Fruty Slot is simple non gambling slot machine game. * 6 | * Copyright (C) 2008-2009 by Todor Balabanov ( tdb@tbsoft-bg.com ) * 7 | * * 8 | * This program is free software: you can redistribute it and/or modify * 9 | * it under the terms of the GNU General Public License as published by * 10 | * the Free Software Foundation, either version 3 of the License, or * 11 | * (at your option) any later version. * 12 | * * 13 | * This program is distributed in the hope that it will be useful, * 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 | * GNU General Public License for more details. * 17 | * * 18 | * You should have received a copy of the GNU General Public License * 19 | * along with this program. If not, see . * 20 | * * 21 | ******************************************************************************/ 22 | 23 | /** 24 | * Implements the logic of the visible part of the reels. Holds number of all 25 | * defined symbols and special symbols. Holds all symbols. Define the visible 26 | * combination of symbols when the reels stop spinning. 27 | * 28 | * @author Stanislav Petrov 29 | * 30 | * @email devilfighter1806@gmail.com 31 | * 32 | * @date 05 Sep 2008 33 | */ 34 | class Reels implements ReelsBase { 35 | 36 | /** 37 | * Symbol 1 constant. 38 | */ 39 | public static final ReelSymbol SYMBOL_01 = new ReelSymbol("Symbol 01"); 40 | 41 | /** 42 | * Symbol 2 constant. 43 | */ 44 | public static final ReelSymbol SYMBOL_02 = new ReelSymbol("Symbol 02"); 45 | 46 | /** 47 | * Symbol 3 constant. 48 | */ 49 | public static final ReelSymbol SYMBOL_03 = new ReelSymbol("Symbol 03"); 50 | 51 | /** 52 | * Symbol 4 constant. 53 | */ 54 | public static final ReelSymbol SYMBOL_04 = new ReelSymbol("Symbol 04"); 55 | 56 | /** 57 | * Symbol 5 constant. 58 | */ 59 | public static final ReelSymbol SYMBOL_05 = new ReelSymbol("Symbol 05"); 60 | 61 | /** 62 | * Symbol 6 constant. 63 | */ 64 | public static final ReelSymbol SYMBOL_06 = new ReelSymbol("Symbol 06"); 65 | 66 | /** 67 | * Symbol 7 constant. 68 | */ 69 | public static final ReelSymbol SYMBOL_07 = new ReelSymbol("Symbol 07"); 70 | 71 | /** 72 | * Symbol 8 constant. 73 | */ 74 | public static final ReelSymbol SYMBOL_08 = new ReelSymbol("Symbol 08"); 75 | 76 | /** 77 | * Symbol 9 constant. 78 | */ 79 | public static final ReelSymbol SYMBOL_09 = new ReelSymbol("Symbol 09"); 80 | 81 | /** 82 | * Special symbol 1 constant. 83 | */ 84 | public static final ReelSymbol SPECIAL_SYMBOL_01 = new ReelSymbol( 85 | "Special Symbol 01"); 86 | 87 | /** 88 | * Number of regular symbols constant. 89 | */ 90 | public static final int REGULAR_NUMBER_OF_SYMBOLS = 9; 91 | 92 | /** 93 | * Indexes of regular symbol constants. 94 | */ 95 | public static final ReelSymbol REGULAR_SYMBOLS[] = { SYMBOL_01, SYMBOL_02, 96 | SYMBOL_03, SYMBOL_04, SYMBOL_05, SYMBOL_06, SYMBOL_07, SYMBOL_08, 97 | SYMBOL_09 }; 98 | 99 | /** 100 | * Number of special symbols constant. 101 | */ 102 | public static final int SPECIAL_NUMBER_OF_SYMBOLS = 1; 103 | 104 | /** 105 | * Indexes of special symbol constants. 106 | */ 107 | public static final ReelSymbol SPECIAL_SYMBOLS[] = { SPECIAL_SYMBOL_01 }; 108 | 109 | /** 110 | * Number of total symbols constant. 111 | */ 112 | public static final int TOTAL_NUMBER_OF_SYMBOLS = 10; 113 | 114 | /** 115 | * Indexes of total symbol constants. 116 | */ 117 | public static final ReelSymbol TOTAL_SYMBOLS[] = { SYMBOL_01, SYMBOL_02, 118 | SYMBOL_03, SYMBOL_04, SYMBOL_05, SYMBOL_06, SYMBOL_07, SYMBOL_08, 119 | SYMBOL_09, SPECIAL_SYMBOL_01 }; 120 | 121 | /** 122 | * Visible part of the reels. 123 | */ 124 | private ReelSymbol visibleCombination[][] = new ReelSymbol[COLS][ROWS]; 125 | 126 | /** 127 | * Source of discrette probability distribution. 128 | */ 129 | private ReelsDistribution distribution = new ReelsDistribution(); 130 | 131 | /** 132 | * Constructor. 133 | * 134 | * @author Stanislav Petrov 135 | * 136 | * @email devilfighter1806@gmail.com 137 | * 138 | * @date 05 Sep 2008 139 | */ 140 | public Reels() { 141 | distribution.selectRandomSymbols(visibleCombination); 142 | } 143 | 144 | /** 145 | * Visible part of the reels getter. 146 | * 147 | * @return Visible combination. 148 | * 149 | * @author Stanislav Petrov 150 | * 151 | * @email devilfighter1806@gmail.com 152 | * 153 | * @date 05 Sep 2008 154 | */ 155 | public ReelSymbol[][] getVisibleCombination() { 156 | ReelSymbol combination[][] = new ReelSymbol[COLS][ROWS]; 157 | 158 | for (int j = 0; j < ROWS; j++) { 159 | for (int i = 0; i < COLS; i++) { 160 | combination[i][j] = visibleCombination[i][j]; 161 | } 162 | } 163 | 164 | return combination; 165 | } 166 | 167 | /** 168 | * Visible part of the reels setter. 169 | * 170 | * @param combination 171 | * Combination to be set inside the object. 172 | * 173 | * @author Stanislav Petrov 174 | * 175 | * @email devilfighter1806@gmail.com 176 | * 177 | * @date 05 Sep 2008 178 | */ 179 | public void setVisibleCombination(ReelSymbol combination[][]) { 180 | for (int j = 0; j < ROWS; j++) { 181 | for (int i = 0; i < COLS; i++) { 182 | visibleCombination[i][j] = combination[i][j]; 183 | } 184 | } 185 | } 186 | 187 | /** 188 | * Spin reels. 189 | * 190 | * @author Stanislav Petrov 191 | * 192 | * @email devilfighter1806@gmal.com 193 | * 194 | * @date 09 Oct 2008 195 | */ 196 | public void spin() { 197 | distribution.selectRandomSymbols(visibleCombination); 198 | } 199 | 200 | /** 201 | * Check particular prize combination as part of the reels. 202 | * 203 | * @param combinaton 204 | * Combinaton to be checked. 205 | * 206 | * @return True if combination is winning, false otherwise. 207 | * 208 | * @author Todor Balabanov 209 | * 210 | * @email tdb@tbsoft-bg.com 211 | * 212 | * @date 09 Oct 2008 213 | */ 214 | public boolean hasPrize(final PrizeCombination combination) { 215 | char mask[][] = combination.getCombination().getMask(); 216 | 217 | for (int j = 0; j < ROWS; j++) { 218 | for (int i = 0; i < COLS; i++) { 219 | /* 220 | * Each special symbol can be used for substitution. 221 | */ 222 | boolean specialSymbol = false; 223 | for (int k = 0; k < SPECIAL_NUMBER_OF_SYMBOLS; k++) { 224 | if (visibleCombination[i][j] == SPECIAL_SYMBOLS[k]) { 225 | specialSymbol = true; 226 | } 227 | } 228 | 229 | /* 230 | * If element of the mask is 1 then check for symbol 231 | * equivalence. 232 | */ 233 | if (mask[i][j] == 1 234 | && visibleCombination[i][j] != combination.getSymbol() 235 | && specialSymbol == false) { 236 | return false; 237 | } 238 | } 239 | } 240 | 241 | return true; 242 | } 243 | } 244 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/SlotActivity.java: -------------------------------------------------------------------------------- 1 | package eu.veldsoft.tuty.fruty.slot; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.graphics.Typeface; 6 | import android.media.AudioManager; 7 | import android.media.SoundPool; 8 | import android.os.Bundle; 9 | import android.view.Menu; 10 | import android.view.MenuInflater; 11 | import android.view.MenuItem; 12 | import android.view.View; 13 | import android.widget.Button; 14 | import android.widget.ImageView; 15 | import android.widget.TextView; 16 | 17 | import java.util.HashMap; 18 | import java.util.Map; 19 | 20 | public class SlotActivity extends Activity { 21 | private SoundPool sounds = null; 22 | 23 | private int rollSoundId = -1; 24 | 25 | private int winSoundId = -1; 26 | 27 | /** 28 | * Internal game model instance. 29 | */ 30 | private GameScreen gameScreen = new GameScreen(); 31 | 32 | private ImageView symbols[][] = new ImageView[Reels.COLS][Reels.ROWS]; 33 | 34 | private Map mapping = new HashMap(); 35 | 36 | private void update() { 37 | ((TextView) findViewById(R.id.single_bet_value)).setText("" 38 | + gameScreen.getBet().getValue()); 39 | ((TextView) findViewById(R.id.active_lines_value)).setText("" 40 | + gameScreen.getSelector().numberOfSelectedLines()); 41 | ((TextView) findViewById(R.id.total_bet_value)).setText("" 42 | + (gameScreen.getBet().getValue() * gameScreen.getSelector() 43 | .numberOfSelectedLines())); 44 | ((TextView) findViewById(R.id.winner_paied_value)).setText("" 45 | + gameScreen.getPaid().getValue()); 46 | ((TextView) findViewById(R.id.credit_value)).setText("" 47 | + gameScreen.getCredit().getValue()); 48 | 49 | ReelSymbol combination[][] = gameScreen.getReels() 50 | .getVisibleCombination(); 51 | for (int i = 0; i < combination.length; i++) { 52 | for (int j = 0; j < combination[i].length; j++) { 53 | symbols[i][j].setAlpha(1.0F); 54 | } 55 | } 56 | for (int i = 0; i < combination.length; i++) { 57 | for (int j = 0; j < combination[i].length; j++) { 58 | if (combination[i][j] == null) { 59 | continue; 60 | } 61 | symbols[i][j].setImageResource(mapping.get(combination[i][j])); 62 | } 63 | } 64 | char mask[][] = gameScreen.getPaid().getWinsMask(); 65 | for (int i = 0; i < combination.length; i++) { 66 | for (int j = 0; j < combination[i].length; j++) { 67 | if (mask[i][j] == 1) { 68 | symbols[i][j].setAlpha(0.5F); 69 | } 70 | } 71 | } 72 | } 73 | 74 | @Override 75 | protected void onCreate(Bundle savedInstanceState) { 76 | super.onCreate(savedInstanceState); 77 | setContentView(R.layout.activity_slot); 78 | 79 | sounds = new SoundPool(4, AudioManager.STREAM_MUSIC, 0); 80 | rollSoundId = sounds.load(SlotActivity.this, R.raw.droplet, 1); 81 | winSoundId = sounds.load(SlotActivity.this, R.raw.pinc, 1); 82 | 83 | mapping.put(Reels.SYMBOL_01, R.drawable.symbol00); 84 | mapping.put(Reels.SYMBOL_02, R.drawable.symbol01); 85 | mapping.put(Reels.SYMBOL_03, R.drawable.symbol02); 86 | mapping.put(Reels.SYMBOL_04, R.drawable.symbol03); 87 | mapping.put(Reels.SYMBOL_05, R.drawable.symbol04); 88 | mapping.put(Reels.SYMBOL_06, R.drawable.symbol05); 89 | mapping.put(Reels.SYMBOL_07, R.drawable.symbol06); 90 | mapping.put(Reels.SYMBOL_08, R.drawable.symbol07); 91 | mapping.put(Reels.SYMBOL_09, R.drawable.symbol08); 92 | mapping.put(Reels.SPECIAL_SYMBOL_01, R.drawable.symbol09); 93 | 94 | symbols[0][0] = (ImageView) findViewById(R.id.symbol00); 95 | symbols[1][0] = (ImageView) findViewById(R.id.symbol10); 96 | symbols[2][0] = (ImageView) findViewById(R.id.symbol20); 97 | symbols[3][0] = (ImageView) findViewById(R.id.symbol30); 98 | symbols[4][0] = (ImageView) findViewById(R.id.symbol40); 99 | symbols[0][1] = (ImageView) findViewById(R.id.symbol01); 100 | symbols[1][1] = (ImageView) findViewById(R.id.symbol11); 101 | symbols[2][1] = (ImageView) findViewById(R.id.symbol21); 102 | symbols[3][1] = (ImageView) findViewById(R.id.symbol31); 103 | symbols[4][1] = (ImageView) findViewById(R.id.symbol41); 104 | symbols[0][2] = (ImageView) findViewById(R.id.symbol02); 105 | symbols[1][2] = (ImageView) findViewById(R.id.symbol12); 106 | symbols[2][2] = (ImageView) findViewById(R.id.symbol22); 107 | symbols[3][2] = (ImageView) findViewById(R.id.symbol32); 108 | symbols[4][2] = (ImageView) findViewById(R.id.symbol42); 109 | 110 | Typeface typeface = Typeface.createFromAsset(getAssets(), 111 | getResources().getString(R.string.digits_font_path)); 112 | ((TextView) findViewById(R.id.single_bet_value)).setTypeface(typeface); 113 | ((TextView) findViewById(R.id.active_lines_value)) 114 | .setTypeface(typeface); 115 | ((TextView) findViewById(R.id.total_bet_value)).setTypeface(typeface); 116 | ((TextView) findViewById(R.id.winner_paied_value)) 117 | .setTypeface(typeface); 118 | ((TextView) findViewById(R.id.credit_value)).setTypeface(typeface); 119 | 120 | ((Button) findViewById(R.id.spin_button)) 121 | .setOnClickListener(new View.OnClickListener() { 122 | @Override 123 | public void onClick(View v) { 124 | gameScreen.spinReels(); 125 | update(); 126 | 127 | if (gameScreen.getPaid().getValue() > 0) { 128 | sounds.play(winSoundId, 0.99f, 0.99f, 0, 0, 1); 129 | } else { 130 | sounds.play(rollSoundId, 0.99f, 0.99f, 0, 0, 1); 131 | } 132 | } 133 | }); 134 | 135 | ((Button) findViewById(R.id.lines_button)) 136 | .setOnClickListener(new View.OnClickListener() { 137 | @Override 138 | public void onClick(View v) { 139 | // TODO Implement line selection. 140 | // gameScreen.numberOfLinesChange(); 141 | // update(); 142 | } 143 | }); 144 | 145 | ((Button) findViewById(R.id.bet_button)) 146 | .setOnClickListener(new View.OnClickListener() { 147 | @Override 148 | public void onClick(View v) { 149 | gameScreen.betChange(); 150 | update(); 151 | } 152 | }); 153 | 154 | ((Button) findViewById(R.id.max_bet_button)) 155 | .setOnClickListener(new View.OnClickListener() { 156 | @Override 157 | public void onClick(View v) { 158 | gameScreen.maxBetChange(); 159 | update(); 160 | } 161 | }); 162 | 163 | ((Button) findViewById(R.id.autoplay_button)) 164 | .setOnClickListener(new View.OnClickListener() { 165 | @Override 166 | public void onClick(View v) { 167 | // TODO gameScreen.autoplayChange(); 168 | update(); 169 | } 170 | }); 171 | 172 | update(); 173 | } 174 | 175 | @Override 176 | protected void onDestroy() { 177 | super.onDestroy(); 178 | 179 | sounds.release(); 180 | sounds = null; 181 | } 182 | 183 | @Override 184 | public boolean onCreateOptionsMenu(Menu menu) { 185 | MenuInflater inflater = getMenuInflater(); 186 | inflater.inflate(R.menu.menu_slot, menu); 187 | return super.onCreateOptionsMenu(menu); 188 | } 189 | 190 | @Override 191 | public boolean onOptionsItemSelected(MenuItem item) { 192 | if (item.getItemId() == R.id.credit1000) { 193 | gameScreen.addCredit(1000); 194 | update(); 195 | startActivity(new Intent(this, InnerBannerActivity.class)); 196 | } 197 | 198 | if (item.getItemId() == R.id.help) { 199 | startActivity(new Intent(this, HelpActivity.class)); 200 | } 201 | 202 | if (item.getItemId() == R.id.about) { 203 | startActivity(new Intent(this, AboutActivity.class)); 204 | } 205 | 206 | return true; 207 | } 208 | } 209 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | # This is normally unused 84 | # shellcheck disable=SC2034 85 | APP_BASE_NAME=${0##*/} 86 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) 87 | APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit 88 | 89 | # Use the maximum available, or set MAX_FD != -1 to use that value. 90 | MAX_FD=maximum 91 | 92 | warn () { 93 | echo "$*" 94 | } >&2 95 | 96 | die () { 97 | echo 98 | echo "$*" 99 | echo 100 | exit 1 101 | } >&2 102 | 103 | # OS specific support (must be 'true' or 'false'). 104 | cygwin=false 105 | msys=false 106 | darwin=false 107 | nonstop=false 108 | case "$( uname )" in #( 109 | CYGWIN* ) cygwin=true ;; #( 110 | Darwin* ) darwin=true ;; #( 111 | MSYS* | MINGW* ) msys=true ;; #( 112 | NONSTOP* ) nonstop=true ;; 113 | esac 114 | 115 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 116 | 117 | 118 | # Determine the Java command to use to start the JVM. 119 | if [ -n "$JAVA_HOME" ] ; then 120 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 121 | # IBM's JDK on AIX uses strange locations for the executables 122 | JAVACMD=$JAVA_HOME/jre/sh/java 123 | else 124 | JAVACMD=$JAVA_HOME/bin/java 125 | fi 126 | if [ ! -x "$JAVACMD" ] ; then 127 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 128 | 129 | Please set the JAVA_HOME variable in your environment to match the 130 | location of your Java installation." 131 | fi 132 | else 133 | JAVACMD=java 134 | if ! command -v java >/dev/null 2>&1 135 | then 136 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | fi 142 | 143 | # Increase the maximum file descriptors if we can. 144 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 145 | case $MAX_FD in #( 146 | max*) 147 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 148 | # shellcheck disable=SC2039,SC3045 149 | MAX_FD=$( ulimit -H -n ) || 150 | warn "Could not query maximum file descriptor limit" 151 | esac 152 | case $MAX_FD in #( 153 | '' | soft) :;; #( 154 | *) 155 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 156 | # shellcheck disable=SC2039,SC3045 157 | ulimit -n "$MAX_FD" || 158 | warn "Could not set maximum file descriptor limit to $MAX_FD" 159 | esac 160 | fi 161 | 162 | # Collect all arguments for the java command, stacking in reverse order: 163 | # * args from the command line 164 | # * the main class name 165 | # * -classpath 166 | # * -D...appname settings 167 | # * --module-path (only if needed) 168 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 169 | 170 | # For Cygwin or MSYS, switch paths to Windows format before running java 171 | if "$cygwin" || "$msys" ; then 172 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 173 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 174 | 175 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 176 | 177 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 178 | for arg do 179 | if 180 | case $arg in #( 181 | -*) false ;; # don't mess with options #( 182 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 183 | [ -e "$t" ] ;; #( 184 | *) false ;; 185 | esac 186 | then 187 | arg=$( cygpath --path --ignore --mixed "$arg" ) 188 | fi 189 | # Roll the args list around exactly as many times as the number of 190 | # args, so each arg winds up back in the position where it started, but 191 | # possibly modified. 192 | # 193 | # NB: a `for` loop captures its iteration list before it begins, so 194 | # changing the positional parameters here affects neither the number of 195 | # iterations, nor the values presented in `arg`. 196 | shift # remove old arg 197 | set -- "$@" "$arg" # push replacement arg 198 | done 199 | fi 200 | 201 | 202 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 203 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 204 | 205 | # Collect all arguments for the java command: 206 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, 207 | # and any embedded shellness will be escaped. 208 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be 209 | # treated as '${Hostname}' itself on the command line. 210 | 211 | set -- \ 212 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 213 | -classpath "$CLASSPATH" \ 214 | org.gradle.wrapper.GradleWrapperMain \ 215 | "$@" 216 | 217 | # Stop when "xargs" is not available. 218 | if ! command -v xargs >/dev/null 2>&1 219 | then 220 | die "xargs is not available" 221 | fi 222 | 223 | # Use "xargs" to parse quoted args. 224 | # 225 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 226 | # 227 | # In Bash we could simply go: 228 | # 229 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 230 | # set -- "${ARGS[@]}" "$@" 231 | # 232 | # but POSIX shell has neither arrays nor command substitution, so instead we 233 | # post-process each arg (as a line of input to sed) to backslash-escape any 234 | # character that might be a shell metacharacter, then use eval to reverse 235 | # that process (while maintaining the separation between arguments), and wrap 236 | # the whole thing up as a single "set" statement. 237 | # 238 | # This will of course break if any of these variables contains a newline or 239 | # an unmatched quote. 240 | # 241 | 242 | eval "set -- $( 243 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 244 | xargs -n1 | 245 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 246 | tr '\n' ' ' 247 | )" '"$@"' 248 | 249 | exec "$JAVACMD" "$@" 250 | -------------------------------------------------------------------------------- /TutyFrutySlotForAndroid/src/main/res/layout/activity_slot.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 17 | 18 | 27 | 28 | 35 | 36 | 43 | 44 | 51 | 52 | 59 | 60 | 69 | 70 | 77 | 78 | 85 | 86 | 93 | 94 | 101 | 102 | 111 | 112 | 119 | 120 | 127 | 128 | 135 | 136 | 143 | 144 | 152 | 153 | 161 | 162 | 170 | 171 | 179 | 180 | 188 | 189 |