├── 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 |
5 |
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 |
8 |
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 |
--------------------------------------------------------------------------------
/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 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
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 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
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 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
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 |
198 |
199 |
208 |
209 |
218 |
219 |
228 |
229 |
238 |
239 |
248 |
249 |
--------------------------------------------------------------------------------
/TutyFrutySlotForAndroid/src/main/java/eu/veldsoft/tuty/fruty/slot/ReelsDistribution.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 testing of the symbols' combination. Fills the reels with
25 | * special arranging of symbols. As a result it holds symbol's distribution on
26 | * every reel. Holds number of elements of every reel.
27 | *
28 | * @author Stanislav Petrov
29 | *
30 | * @email devilfighter1806@gmail.com
31 | *
32 | * @date 08 Sep 2008
33 | */
34 | class ReelsDistribution implements ReelsBase {
35 |
36 | /**
37 | * Number of symbols of a reel.
38 | */
39 | public static final int DISTRIBUTION_SIZE = 256;
40 |
41 | /**
42 | * Virtual reels, containing ordered symbols.
43 | */
44 | public static final ReelSymbol DISTRIBUTION[][] = {
45 | { Reels.SYMBOL_06, Reels.SYMBOL_01, Reels.SYMBOL_03,
46 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_05,
47 | Reels.SYMBOL_06, Reels.SYMBOL_01, Reels.SYMBOL_01,
48 | Reels.SYMBOL_05, Reels.SYMBOL_01, Reels.SYMBOL_02,
49 | Reels.SYMBOL_06, Reels.SYMBOL_06, Reels.SYMBOL_03,
50 | Reels.SYMBOL_02, Reels.SYMBOL_03, Reels.SYMBOL_02,
51 | Reels.SYMBOL_05, Reels.SYMBOL_03, Reels.SYMBOL_02,
52 | Reels.SYMBOL_02, Reels.SYMBOL_07, Reels.SYMBOL_03,
53 | Reels.SYMBOL_08, Reels.SYMBOL_04, Reels.SYMBOL_01,
54 | Reels.SYMBOL_07, Reels.SYMBOL_02, Reels.SYMBOL_05,
55 | Reels.SYMBOL_07, Reels.SYMBOL_02, Reels.SYMBOL_01,
56 | Reels.SYMBOL_03, Reels.SYMBOL_05, Reels.SYMBOL_01,
57 | Reels.SYMBOL_02, Reels.SYMBOL_04, Reels.SYMBOL_02,
58 | Reels.SYMBOL_02, Reels.SYMBOL_02, Reels.SYMBOL_03,
59 | Reels.SYMBOL_03, Reels.SYMBOL_04, Reels.SYMBOL_01,
60 | Reels.SYMBOL_03, Reels.SYMBOL_01, Reels.SYMBOL_02,
61 | Reels.SYMBOL_03, Reels.SYMBOL_01, Reels.SYMBOL_04,
62 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_08,
63 | Reels.SYMBOL_06, Reels.SYMBOL_07, Reels.SYMBOL_02,
64 | Reels.SYMBOL_02, Reels.SYMBOL_04, Reels.SYMBOL_02,
65 | Reels.SYMBOL_04, Reels.SYMBOL_02, Reels.SYMBOL_05,
66 | Reels.SYMBOL_05, Reels.SYMBOL_04, Reels.SYMBOL_06,
67 | Reels.SYMBOL_06, Reels.SYMBOL_03, Reels.SYMBOL_04,
68 | Reels.SYMBOL_04, Reels.SYMBOL_06, Reels.SYMBOL_03,
69 | Reels.SYMBOL_02, Reels.SYMBOL_02, Reels.SYMBOL_01,
70 | Reels.SYMBOL_05, Reels.SYMBOL_07, Reels.SYMBOL_01,
71 | Reels.SYMBOL_06, Reels.SYMBOL_01, Reels.SYMBOL_01,
72 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_07,
73 | Reels.SYMBOL_05, Reels.SYMBOL_02, Reels.SYMBOL_02,
74 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_03,
75 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_01,
76 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_03,
77 | Reels.SYMBOL_04, Reels.SYMBOL_01, Reels.SYMBOL_03,
78 | Reels.SYMBOL_05, Reels.SYMBOL_04, Reels.SYMBOL_04,
79 | Reels.SYMBOL_07, Reels.SYMBOL_02, Reels.SYMBOL_05,
80 | Reels.SYMBOL_03, Reels.SYMBOL_03, Reels.SYMBOL_01,
81 | Reels.SYMBOL_04, Reels.SYMBOL_03, Reels.SYMBOL_02,
82 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_01,
83 | Reels.SYMBOL_03, Reels.SYMBOL_03, Reels.SYMBOL_06,
84 | Reels.SYMBOL_01, Reels.SYMBOL_08, Reels.SYMBOL_02,
85 | Reels.SYMBOL_08, Reels.SYMBOL_03, Reels.SYMBOL_05,
86 | Reels.SYMBOL_05, Reels.SYMBOL_03, Reels.SYMBOL_04,
87 | Reels.SYMBOL_07, Reels.SPECIAL_SYMBOL_01,
88 | Reels.SPECIAL_SYMBOL_01, Reels.SYMBOL_04, Reels.SYMBOL_09,
89 | Reels.SYMBOL_05, Reels.SYMBOL_01, Reels.SYMBOL_01,
90 | Reels.SYMBOL_08, Reels.SYMBOL_07, Reels.SYMBOL_08,
91 | Reels.SYMBOL_09, Reels.SYMBOL_02, Reels.SYMBOL_05,
92 | Reels.SYMBOL_06, Reels.SYMBOL_02, Reels.SYMBOL_03,
93 | Reels.SYMBOL_04, Reels.SYMBOL_03, Reels.SYMBOL_03,
94 | Reels.SYMBOL_08, Reels.SYMBOL_05, Reels.SYMBOL_03,
95 | Reels.SYMBOL_04, Reels.SYMBOL_06, Reels.SYMBOL_06,
96 | Reels.SYMBOL_06, Reels.SYMBOL_04, Reels.SYMBOL_04,
97 | Reels.SYMBOL_01, Reels.SYMBOL_04, Reels.SYMBOL_01,
98 | Reels.SYMBOL_03, Reels.SYMBOL_05, Reels.SYMBOL_01,
99 | Reels.SYMBOL_05, Reels.SYMBOL_06, Reels.SYMBOL_01,
100 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_03,
101 | Reels.SYMBOL_01, Reels.SYMBOL_06, Reels.SYMBOL_04,
102 | Reels.SYMBOL_02, Reels.SPECIAL_SYMBOL_01, Reels.SYMBOL_02,
103 | Reels.SYMBOL_03, Reels.SYMBOL_05, Reels.SYMBOL_03,
104 | Reels.SYMBOL_06, Reels.SYMBOL_01, Reels.SYMBOL_03,
105 | Reels.SYMBOL_05, Reels.SYMBOL_03, Reels.SYMBOL_07,
106 | Reels.SPECIAL_SYMBOL_01, Reels.SYMBOL_07, Reels.SYMBOL_03,
107 | Reels.SYMBOL_07, Reels.SYMBOL_05, Reels.SYMBOL_05,
108 | Reels.SYMBOL_03, Reels.SYMBOL_02, Reels.SYMBOL_04,
109 | Reels.SYMBOL_06, Reels.SYMBOL_02, Reels.SYMBOL_04,
110 | Reels.SYMBOL_02, Reels.SYMBOL_04, Reels.SYMBOL_01,
111 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_08,
112 | Reels.SYMBOL_03, Reels.SYMBOL_01, Reels.SYMBOL_05,
113 | Reels.SYMBOL_04, Reels.SYMBOL_01, Reels.SYMBOL_07,
114 | Reels.SYMBOL_05, Reels.SYMBOL_06, Reels.SYMBOL_01,
115 | Reels.SYMBOL_09, Reels.SYMBOL_02, Reels.SYMBOL_02,
116 | Reels.SYMBOL_05, Reels.SYMBOL_01, Reels.SYMBOL_05,
117 | Reels.SYMBOL_05, Reels.SYMBOL_01, Reels.SYMBOL_02,
118 | Reels.SYMBOL_06, Reels.SYMBOL_04, Reels.SYMBOL_01,
119 | Reels.SYMBOL_04, Reels.SYMBOL_05, Reels.SYMBOL_06,
120 | Reels.SYMBOL_08, Reels.SYMBOL_01, Reels.SYMBOL_07,
121 | Reels.SYMBOL_04, Reels.SYMBOL_04, Reels.SYMBOL_01,
122 | Reels.SYMBOL_03, Reels.SYMBOL_04, Reels.SYMBOL_08,
123 | Reels.SYMBOL_04, Reels.SYMBOL_04, Reels.SYMBOL_03,
124 | Reels.SYMBOL_02, Reels.SYMBOL_03, Reels.SYMBOL_04,
125 | Reels.SYMBOL_04, Reels.SYMBOL_03, Reels.SYMBOL_06,
126 | Reels.SYMBOL_07, Reels.SYMBOL_03, Reels.SYMBOL_01,
127 | Reels.SYMBOL_01, Reels.SYMBOL_09, Reels.SYMBOL_02,
128 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_01,
129 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_07,
130 | Reels.SYMBOL_01, Reels.SYMBOL_02 },
131 | { Reels.SYMBOL_02, Reels.SYMBOL_02, Reels.SYMBOL_04,
132 | Reels.SYMBOL_05, Reels.SYMBOL_07, Reels.SYMBOL_02,
133 | Reels.SYMBOL_07, Reels.SYMBOL_01, Reels.SYMBOL_01,
134 | Reels.SYMBOL_05, Reels.SYMBOL_01, Reels.SYMBOL_06,
135 | Reels.SYMBOL_01, Reels.SYMBOL_08, Reels.SYMBOL_02,
136 | Reels.SYMBOL_05, Reels.SYMBOL_01, Reels.SYMBOL_02,
137 | Reels.SYMBOL_07, Reels.SYMBOL_03, Reels.SYMBOL_02,
138 | Reels.SYMBOL_01, Reels.SYMBOL_04, Reels.SYMBOL_04,
139 | Reels.SYMBOL_03, Reels.SYMBOL_07, Reels.SPECIAL_SYMBOL_01,
140 | Reels.SYMBOL_07, Reels.SYMBOL_01, Reels.SYMBOL_01,
141 | Reels.SYMBOL_03, Reels.SYMBOL_04, Reels.SYMBOL_02,
142 | Reels.SYMBOL_07, Reels.SYMBOL_05, Reels.SYMBOL_01,
143 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_01,
144 | Reels.SYMBOL_01, Reels.SYMBOL_05, Reels.SYMBOL_01,
145 | Reels.SYMBOL_06, Reels.SYMBOL_01, Reels.SYMBOL_03,
146 | Reels.SYMBOL_03, Reels.SYMBOL_02, Reels.SYMBOL_04,
147 | Reels.SYMBOL_04, Reels.SYMBOL_02, Reels.SYMBOL_01,
148 | Reels.SYMBOL_06, Reels.SYMBOL_03, Reels.SYMBOL_02,
149 | Reels.SYMBOL_06, Reels.SYMBOL_01, Reels.SYMBOL_03,
150 | Reels.SYMBOL_03, Reels.SYMBOL_04, Reels.SYMBOL_05,
151 | Reels.SYMBOL_03, Reels.SYMBOL_02, Reels.SYMBOL_03,
152 | Reels.SYMBOL_02, Reels.SYMBOL_06, Reels.SYMBOL_02,
153 | Reels.SYMBOL_02, Reels.SYMBOL_06, Reels.SYMBOL_01,
154 | Reels.SYMBOL_02, Reels.SYMBOL_08, Reels.SYMBOL_02,
155 | Reels.SYMBOL_04, Reels.SYMBOL_06, Reels.SYMBOL_01,
156 | Reels.SYMBOL_04, Reels.SYMBOL_01, Reels.SYMBOL_06,
157 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_06,
158 | Reels.SYMBOL_06, Reels.SYMBOL_04, Reels.SYMBOL_06,
159 | Reels.SYMBOL_05, Reels.SYMBOL_04, Reels.SYMBOL_04,
160 | Reels.SYMBOL_03, Reels.SYMBOL_01, Reels.SYMBOL_01,
161 | Reels.SYMBOL_08, Reels.SYMBOL_04, Reels.SYMBOL_02,
162 | Reels.SYMBOL_03, Reels.SYMBOL_01, Reels.SYMBOL_04,
163 | Reels.SYMBOL_02, Reels.SYMBOL_05, Reels.SYMBOL_02,
164 | Reels.SYMBOL_03, Reels.SPECIAL_SYMBOL_01, Reels.SYMBOL_06,
165 | Reels.SYMBOL_02, Reels.SYMBOL_02, Reels.SYMBOL_06,
166 | Reels.SYMBOL_03, Reels.SYMBOL_05, Reels.SYMBOL_09,
167 | Reels.SYMBOL_02, Reels.SYMBOL_04, Reels.SYMBOL_08,
168 | Reels.SYMBOL_02, Reels.SYMBOL_05, Reels.SYMBOL_03,
169 | Reels.SYMBOL_02, Reels.SYMBOL_04, Reels.SYMBOL_07,
170 | Reels.SYMBOL_06, Reels.SYMBOL_02, Reels.SYMBOL_05,
171 | Reels.SYMBOL_03, Reels.SYMBOL_06, Reels.SYMBOL_09,
172 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_05,
173 | Reels.SYMBOL_04, Reels.SYMBOL_07, Reels.SYMBOL_03,
174 | Reels.SYMBOL_02, Reels.SYMBOL_08, Reels.SYMBOL_02,
175 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_02,
176 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_01,
177 | Reels.SYMBOL_03, Reels.SYMBOL_03, Reels.SYMBOL_05,
178 | Reels.SYMBOL_04, Reels.SYMBOL_05, Reels.SYMBOL_06,
179 | Reels.SYMBOL_01, Reels.SYMBOL_07, Reels.SYMBOL_01,
180 | Reels.SYMBOL_07, Reels.SYMBOL_01, Reels.SYMBOL_06,
181 | Reels.SYMBOL_06, Reels.SYMBOL_08, Reels.SYMBOL_04,
182 | Reels.SYMBOL_02, Reels.SYMBOL_08, Reels.SYMBOL_09,
183 | Reels.SYMBOL_03, Reels.SYMBOL_04, Reels.SYMBOL_01,
184 | Reels.SYMBOL_04, Reels.SYMBOL_03, Reels.SYMBOL_03,
185 | Reels.SYMBOL_05, Reels.SYMBOL_01, Reels.SYMBOL_04,
186 | Reels.SYMBOL_08, Reels.SYMBOL_07, Reels.SYMBOL_03,
187 | Reels.SYMBOL_02, Reels.SYMBOL_02, Reels.SYMBOL_02,
188 | Reels.SYMBOL_04, Reels.SYMBOL_02, Reels.SYMBOL_06,
189 | Reels.SYMBOL_01, Reels.SYMBOL_03, Reels.SYMBOL_02,
190 | Reels.SYMBOL_02, Reels.SYMBOL_06, Reels.SYMBOL_08,
191 | Reels.SYMBOL_02, Reels.SYMBOL_06, Reels.SYMBOL_05,
192 | Reels.SYMBOL_01, Reels.SYMBOL_06, Reels.SYMBOL_05,
193 | Reels.SYMBOL_03, Reels.SYMBOL_01, Reels.SYMBOL_01,
194 | Reels.SYMBOL_08, Reels.SYMBOL_03, Reels.SYMBOL_01,
195 | Reels.SYMBOL_01, Reels.SYMBOL_04, Reels.SPECIAL_SYMBOL_01,
196 | Reels.SYMBOL_04, Reels.SYMBOL_04, Reels.SYMBOL_01,
197 | Reels.SYMBOL_02, Reels.SYMBOL_05, Reels.SYMBOL_01,
198 | Reels.SPECIAL_SYMBOL_01, Reels.SYMBOL_05, Reels.SYMBOL_04,
199 | Reels.SYMBOL_04, Reels.SYMBOL_03, Reels.SYMBOL_02,
200 | Reels.SYMBOL_05, Reels.SYMBOL_03, Reels.SYMBOL_01,
201 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_05,
202 | Reels.SYMBOL_03, Reels.SYMBOL_01, Reels.SYMBOL_04,
203 | Reels.SYMBOL_03, Reels.SYMBOL_04, Reels.SYMBOL_01,
204 | Reels.SYMBOL_07, Reels.SYMBOL_03, Reels.SYMBOL_05,
205 | Reels.SYMBOL_03, Reels.SYMBOL_02, Reels.SYMBOL_01,
206 | Reels.SYMBOL_04, Reels.SYMBOL_01, Reels.SYMBOL_03,
207 | Reels.SYMBOL_05, Reels.SYMBOL_03, Reels.SYMBOL_05,
208 | Reels.SYMBOL_07, Reels.SYMBOL_02, Reels.SYMBOL_02,
209 | Reels.SYMBOL_03, Reels.SYMBOL_01, Reels.SYMBOL_05,
210 | Reels.SYMBOL_04, Reels.SYMBOL_05, Reels.SYMBOL_07,
211 | Reels.SYMBOL_03, Reels.SYMBOL_07, Reels.SYMBOL_05,
212 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_03,
213 | Reels.SYMBOL_09, Reels.SYMBOL_03, Reels.SYMBOL_03,
214 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_04,
215 | Reels.SYMBOL_07, Reels.SYMBOL_05, Reels.SYMBOL_04,
216 | Reels.SYMBOL_03 },
217 | { Reels.SYMBOL_04, Reels.SYMBOL_05, Reels.SYMBOL_01,
218 | Reels.SYMBOL_01, Reels.SYMBOL_06, Reels.SYMBOL_07,
219 | Reels.SYMBOL_02, Reels.SYMBOL_03, Reels.SYMBOL_03,
220 | Reels.SYMBOL_01, Reels.SYMBOL_06, Reels.SYMBOL_05,
221 | Reels.SYMBOL_04, Reels.SYMBOL_03, Reels.SYMBOL_02,
222 | Reels.SYMBOL_02, Reels.SYMBOL_02, Reels.SYMBOL_02,
223 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_01,
224 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_01,
225 | Reels.SYMBOL_05, Reels.SYMBOL_02, Reels.SYMBOL_01,
226 | Reels.SYMBOL_06, Reels.SYMBOL_04, Reels.SYMBOL_01,
227 | Reels.SYMBOL_01, Reels.SYMBOL_03, Reels.SYMBOL_03,
228 | Reels.SYMBOL_03, Reels.SYMBOL_01, Reels.SYMBOL_01,
229 | Reels.SYMBOL_01, Reels.SYMBOL_09, Reels.SYMBOL_01,
230 | Reels.SYMBOL_01, Reels.SYMBOL_03, Reels.SYMBOL_02,
231 | Reels.SYMBOL_03, Reels.SYMBOL_05, Reels.SYMBOL_05,
232 | Reels.SYMBOL_03, Reels.SYMBOL_07, Reels.SYMBOL_02,
233 | Reels.SYMBOL_01, Reels.SYMBOL_05, Reels.SYMBOL_01,
234 | Reels.SYMBOL_02, Reels.SYMBOL_05, Reels.SYMBOL_01,
235 | Reels.SYMBOL_04, Reels.SYMBOL_04, Reels.SYMBOL_07,
236 | Reels.SYMBOL_07, Reels.SYMBOL_03, Reels.SYMBOL_04,
237 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_04,
238 | Reels.SYMBOL_02, Reels.SYMBOL_02, Reels.SYMBOL_07,
239 | Reels.SYMBOL_04, Reels.SYMBOL_05, Reels.SYMBOL_08,
240 | Reels.SYMBOL_02, Reels.SYMBOL_07, Reels.SYMBOL_02,
241 | Reels.SYMBOL_01, Reels.SYMBOL_04, Reels.SYMBOL_07,
242 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_02,
243 | Reels.SYMBOL_04, Reels.SYMBOL_02, Reels.SYMBOL_05,
244 | Reels.SYMBOL_03, Reels.SYMBOL_04, Reels.SYMBOL_05,
245 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_02,
246 | Reels.SYMBOL_02, Reels.SYMBOL_03, Reels.SYMBOL_04,
247 | Reels.SYMBOL_01, Reels.SYMBOL_09, Reels.SYMBOL_01,
248 | Reels.SYMBOL_06, Reels.SYMBOL_07, Reels.SYMBOL_04,
249 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_06,
250 | Reels.SYMBOL_09, Reels.SYMBOL_06, Reels.SYMBOL_06,
251 | Reels.SYMBOL_05, Reels.SYMBOL_08, Reels.SYMBOL_01,
252 | Reels.SYMBOL_05, Reels.SPECIAL_SYMBOL_01, Reels.SYMBOL_06,
253 | Reels.SYMBOL_04, Reels.SYMBOL_05, Reels.SYMBOL_01,
254 | Reels.SYMBOL_06, Reels.SYMBOL_04, Reels.SYMBOL_03,
255 | Reels.SYMBOL_02, Reels.SYMBOL_05, Reels.SYMBOL_03,
256 | Reels.SYMBOL_01, Reels.SYMBOL_08, Reels.SYMBOL_03,
257 | Reels.SYMBOL_08, Reels.SYMBOL_02, Reels.SYMBOL_05,
258 | Reels.SYMBOL_01, Reels.SYMBOL_06, Reels.SYMBOL_03,
259 | Reels.SYMBOL_08, Reels.SYMBOL_01, Reels.SYMBOL_05,
260 | Reels.SYMBOL_08, Reels.SYMBOL_04, Reels.SYMBOL_01,
261 | Reels.SYMBOL_05, Reels.SYMBOL_04, Reels.SYMBOL_04,
262 | Reels.SYMBOL_03, Reels.SYMBOL_06, Reels.SYMBOL_03,
263 | Reels.SYMBOL_03, Reels.SYMBOL_03, Reels.SYMBOL_03,
264 | Reels.SYMBOL_05, Reels.SYMBOL_02, Reels.SYMBOL_08,
265 | Reels.SYMBOL_07, Reels.SYMBOL_06, Reels.SYMBOL_04,
266 | Reels.SYMBOL_04, Reels.SYMBOL_04, Reels.SYMBOL_02,
267 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_01,
268 | Reels.SYMBOL_04, Reels.SYMBOL_07, Reels.SYMBOL_06,
269 | Reels.SYMBOL_06, Reels.SYMBOL_03, Reels.SYMBOL_02,
270 | Reels.SYMBOL_08, Reels.SYMBOL_05, Reels.SYMBOL_06,
271 | Reels.SYMBOL_05, Reels.SYMBOL_01, Reels.SYMBOL_04,
272 | Reels.SYMBOL_01, Reels.SYMBOL_05, Reels.SPECIAL_SYMBOL_01,
273 | Reels.SYMBOL_03, Reels.SYMBOL_03, Reels.SYMBOL_06,
274 | Reels.SYMBOL_01, Reels.SYMBOL_07, Reels.SYMBOL_02,
275 | Reels.SYMBOL_04, Reels.SYMBOL_05, Reels.SYMBOL_03,
276 | Reels.SYMBOL_07, Reels.SPECIAL_SYMBOL_01, Reels.SYMBOL_02,
277 | Reels.SYMBOL_04, Reels.SYMBOL_01, Reels.SYMBOL_01,
278 | Reels.SYMBOL_03, Reels.SYMBOL_06, Reels.SYMBOL_03,
279 | Reels.SYMBOL_03, Reels.SYMBOL_04, Reels.SYMBOL_07,
280 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_06,
281 | Reels.SYMBOL_06, Reels.SYMBOL_01, Reels.SYMBOL_02,
282 | Reels.SYMBOL_05, Reels.SYMBOL_06, Reels.SYMBOL_02,
283 | Reels.SYMBOL_01, Reels.SYMBOL_05, Reels.SYMBOL_04,
284 | Reels.SYMBOL_04, Reels.SYMBOL_04, Reels.SYMBOL_04,
285 | Reels.SYMBOL_03, Reels.SPECIAL_SYMBOL_01, Reels.SYMBOL_02,
286 | Reels.SYMBOL_03, Reels.SYMBOL_03, Reels.SYMBOL_03,
287 | Reels.SYMBOL_02, Reels.SYMBOL_04, Reels.SYMBOL_07,
288 | Reels.SYMBOL_05, Reels.SYMBOL_03, Reels.SYMBOL_05,
289 | Reels.SYMBOL_03, Reels.SYMBOL_02, Reels.SYMBOL_03,
290 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_04,
291 | Reels.SYMBOL_02, Reels.SYMBOL_02, Reels.SYMBOL_03,
292 | Reels.SYMBOL_08, Reels.SYMBOL_02, Reels.SYMBOL_03,
293 | Reels.SYMBOL_05, Reels.SYMBOL_09, Reels.SYMBOL_02,
294 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_04,
295 | Reels.SYMBOL_03, Reels.SYMBOL_07, Reels.SYMBOL_05,
296 | Reels.SYMBOL_03, Reels.SYMBOL_03, Reels.SYMBOL_02,
297 | Reels.SYMBOL_01, Reels.SYMBOL_06, Reels.SYMBOL_04,
298 | Reels.SYMBOL_02, Reels.SYMBOL_02, Reels.SYMBOL_02,
299 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_07,
300 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_01,
301 | Reels.SYMBOL_02, Reels.SYMBOL_06, Reels.SYMBOL_08,
302 | Reels.SYMBOL_01 },
303 | { Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_03,
304 | Reels.SYMBOL_07, Reels.SPECIAL_SYMBOL_01, Reels.SYMBOL_04,
305 | Reels.SYMBOL_03, Reels.SYMBOL_01, Reels.SYMBOL_02,
306 | Reels.SYMBOL_08, Reels.SYMBOL_01, Reels.SYMBOL_03,
307 | Reels.SYMBOL_04, Reels.SYMBOL_02, Reels.SYMBOL_04,
308 | Reels.SPECIAL_SYMBOL_01, Reels.SYMBOL_06, Reels.SYMBOL_02,
309 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_04,
310 | Reels.SYMBOL_02, Reels.SYMBOL_03, Reels.SYMBOL_03,
311 | Reels.SYMBOL_07, Reels.SYMBOL_01, Reels.SYMBOL_05,
312 | Reels.SYMBOL_03, Reels.SYMBOL_02, Reels.SYMBOL_04,
313 | Reels.SYMBOL_09, Reels.SYMBOL_03, Reels.SYMBOL_06,
314 | Reels.SYMBOL_01, Reels.SYMBOL_04, Reels.SYMBOL_02,
315 | Reels.SYMBOL_02, Reels.SYMBOL_03, Reels.SYMBOL_05,
316 | Reels.SYMBOL_03, Reels.SYMBOL_01, Reels.SYMBOL_06,
317 | Reels.SYMBOL_07, Reels.SYMBOL_02, Reels.SYMBOL_02,
318 | Reels.SYMBOL_05, Reels.SYMBOL_01, Reels.SPECIAL_SYMBOL_01,
319 | Reels.SYMBOL_02, Reels.SYMBOL_03, Reels.SYMBOL_05,
320 | Reels.SYMBOL_07, Reels.SYMBOL_03, Reels.SYMBOL_03,
321 | Reels.SYMBOL_01, Reels.SYMBOL_05, Reels.SYMBOL_03,
322 | Reels.SYMBOL_03, Reels.SYMBOL_02, Reels.SYMBOL_02,
323 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_04,
324 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_02,
325 | Reels.SYMBOL_06, Reels.SYMBOL_06, Reels.SYMBOL_04,
326 | Reels.SYMBOL_05, Reels.SYMBOL_01, Reels.SYMBOL_07,
327 | Reels.SYMBOL_04, Reels.SYMBOL_02, Reels.SYMBOL_03,
328 | Reels.SYMBOL_06, Reels.SYMBOL_02, Reels.SYMBOL_07,
329 | Reels.SYMBOL_02, Reels.SYMBOL_05, Reels.SYMBOL_08,
330 | Reels.SYMBOL_06, Reels.SYMBOL_05, Reels.SYMBOL_06,
331 | Reels.SYMBOL_04, Reels.SYMBOL_06, Reels.SYMBOL_08,
332 | Reels.SYMBOL_09, Reels.SYMBOL_08, Reels.SYMBOL_08,
333 | Reels.SYMBOL_01, Reels.SYMBOL_05, Reels.SYMBOL_01,
334 | Reels.SYMBOL_04, Reels.SYMBOL_05, Reels.SYMBOL_01,
335 | Reels.SYMBOL_01, Reels.SYMBOL_03, Reels.SYMBOL_04,
336 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_03,
337 | Reels.SYMBOL_08, Reels.SYMBOL_01, Reels.SYMBOL_04,
338 | Reels.SYMBOL_03, Reels.SYMBOL_02, Reels.SYMBOL_01,
339 | Reels.SYMBOL_04, Reels.SYMBOL_02, Reels.SYMBOL_06,
340 | Reels.SYMBOL_01, Reels.SYMBOL_04, Reels.SYMBOL_03,
341 | Reels.SYMBOL_04, Reels.SYMBOL_06, Reels.SYMBOL_06,
342 | Reels.SYMBOL_04, Reels.SYMBOL_02, Reels.SYMBOL_07,
343 | Reels.SYMBOL_04, Reels.SYMBOL_02, Reels.SYMBOL_03,
344 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_04,
345 | Reels.SYMBOL_05, Reels.SYMBOL_04, Reels.SYMBOL_04,
346 | Reels.SYMBOL_02, Reels.SYMBOL_09, Reels.SYMBOL_01,
347 | Reels.SYMBOL_02, Reels.SYMBOL_08, Reels.SYMBOL_01,
348 | Reels.SYMBOL_02, Reels.SYMBOL_02, Reels.SYMBOL_04,
349 | Reels.SYMBOL_01, Reels.SYMBOL_05, Reels.SYMBOL_01,
350 | Reels.SYMBOL_03, Reels.SYMBOL_05, Reels.SYMBOL_06,
351 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_06,
352 | Reels.SYMBOL_02, Reels.SYMBOL_02, Reels.SYMBOL_05,
353 | Reels.SYMBOL_03, Reels.SYMBOL_05, Reels.SYMBOL_06,
354 | Reels.SYMBOL_05, Reels.SYMBOL_03, Reels.SYMBOL_02,
355 | Reels.SYMBOL_06, Reels.SYMBOL_01, Reels.SYMBOL_02,
356 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_04,
357 | Reels.SYMBOL_03, Reels.SYMBOL_02, Reels.SYMBOL_06,
358 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_08,
359 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_02,
360 | Reels.SYMBOL_05, Reels.SYMBOL_02, Reels.SYMBOL_01,
361 | Reels.SYMBOL_03, Reels.SYMBOL_07, Reels.SYMBOL_05,
362 | Reels.SYMBOL_03, Reels.SYMBOL_05, Reels.SYMBOL_01,
363 | Reels.SYMBOL_04, Reels.SYMBOL_01, Reels.SYMBOL_05,
364 | Reels.SYMBOL_06, Reels.SYMBOL_03, Reels.SYMBOL_05,
365 | Reels.SYMBOL_01, Reels.SPECIAL_SYMBOL_01, Reels.SYMBOL_07,
366 | Reels.SYMBOL_03, Reels.SYMBOL_05, Reels.SYMBOL_03,
367 | Reels.SYMBOL_03, Reels.SYMBOL_02, Reels.SYMBOL_01,
368 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_05,
369 | Reels.SYMBOL_03, Reels.SYMBOL_01, Reels.SYMBOL_03,
370 | Reels.SYMBOL_06, Reels.SYMBOL_01, Reels.SYMBOL_02,
371 | Reels.SYMBOL_07, Reels.SYMBOL_07, Reels.SYMBOL_03,
372 | Reels.SYMBOL_01, Reels.SYMBOL_03, Reels.SYMBOL_04,
373 | Reels.SYMBOL_02, Reels.SYMBOL_05, Reels.SYMBOL_08,
374 | Reels.SYMBOL_02, Reels.SYMBOL_04, Reels.SYMBOL_08,
375 | Reels.SYMBOL_03, Reels.SYMBOL_01, Reels.SYMBOL_05,
376 | Reels.SYMBOL_07, Reels.SYMBOL_02, Reels.SYMBOL_05,
377 | Reels.SYMBOL_04, Reels.SYMBOL_01, Reels.SYMBOL_09,
378 | Reels.SYMBOL_03, Reels.SYMBOL_01, Reels.SYMBOL_06,
379 | Reels.SYMBOL_04, Reels.SYMBOL_03, Reels.SYMBOL_04,
380 | Reels.SYMBOL_04, Reels.SYMBOL_03, Reels.SYMBOL_05,
381 | Reels.SYMBOL_04, Reels.SYMBOL_07, Reels.SYMBOL_04,
382 | Reels.SYMBOL_01, Reels.SYMBOL_05, Reels.SYMBOL_02,
383 | Reels.SYMBOL_04, Reels.SYMBOL_03, Reels.SYMBOL_02,
384 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_07,
385 | Reels.SYMBOL_06, Reels.SYMBOL_07, Reels.SYMBOL_06,
386 | Reels.SYMBOL_03, Reels.SYMBOL_04, Reels.SYMBOL_02,
387 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_01,
388 | Reels.SYMBOL_07 },
389 | { Reels.SYMBOL_06, Reels.SYMBOL_03, Reels.SYMBOL_02,
390 | Reels.SYMBOL_01, Reels.SYMBOL_04, Reels.SYMBOL_07,
391 | Reels.SYMBOL_05, Reels.SYMBOL_05, Reels.SYMBOL_04,
392 | Reels.SYMBOL_02, Reels.SYMBOL_05, Reels.SYMBOL_06,
393 | Reels.SYMBOL_02, Reels.SYMBOL_06, Reels.SYMBOL_03,
394 | Reels.SYMBOL_01, Reels.SYMBOL_09, Reels.SYMBOL_01,
395 | Reels.SYMBOL_07, Reels.SYMBOL_01, Reels.SYMBOL_03,
396 | Reels.SYMBOL_06, Reels.SYMBOL_02, Reels.SYMBOL_07,
397 | Reels.SYMBOL_04, Reels.SYMBOL_02, Reels.SYMBOL_08,
398 | Reels.SYMBOL_07, Reels.SYMBOL_05, Reels.SYMBOL_05,
399 | Reels.SYMBOL_04, Reels.SYMBOL_01, Reels.SYMBOL_03,
400 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_04,
401 | Reels.SYMBOL_06, Reels.SYMBOL_04, Reels.SYMBOL_06,
402 | Reels.SYMBOL_02, Reels.SYMBOL_06, Reels.SYMBOL_09,
403 | Reels.SYMBOL_05, Reels.SYMBOL_03, Reels.SPECIAL_SYMBOL_01,
404 | Reels.SYMBOL_05, Reels.SYMBOL_07, Reels.SYMBOL_04,
405 | Reels.SYMBOL_04, Reels.SYMBOL_05, Reels.SYMBOL_04,
406 | Reels.SYMBOL_06, Reels.SYMBOL_01, Reels.SYMBOL_03,
407 | Reels.SYMBOL_01, Reels.SPECIAL_SYMBOL_01, Reels.SYMBOL_04,
408 | Reels.SYMBOL_02, Reels.SYMBOL_02, Reels.SYMBOL_01,
409 | Reels.SYMBOL_05, Reels.SYMBOL_02, Reels.SYMBOL_03,
410 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_04,
411 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_01,
412 | Reels.SYMBOL_01, Reels.SYMBOL_08, Reels.SYMBOL_03,
413 | Reels.SPECIAL_SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_01,
414 | Reels.SYMBOL_04, Reels.SYMBOL_03, Reels.SYMBOL_04,
415 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_08,
416 | Reels.SYMBOL_01, Reels.SYMBOL_04, Reels.SYMBOL_03,
417 | Reels.SYMBOL_07, Reels.SYMBOL_02, Reels.SYMBOL_02,
418 | Reels.SYMBOL_03, Reels.SYMBOL_07, Reels.SYMBOL_02,
419 | Reels.SYMBOL_02, Reels.SYMBOL_03, Reels.SYMBOL_03,
420 | Reels.SYMBOL_04, Reels.SYMBOL_05, Reels.SYMBOL_05,
421 | Reels.SYMBOL_07, Reels.SYMBOL_01, Reels.SYMBOL_01,
422 | Reels.SYMBOL_02, Reels.SYMBOL_02, Reels.SYMBOL_01,
423 | Reels.SYMBOL_05, Reels.SYMBOL_01, Reels.SYMBOL_01,
424 | Reels.SYMBOL_03, Reels.SYMBOL_02, Reels.SYMBOL_08,
425 | Reels.SYMBOL_02, Reels.SYMBOL_07, Reels.SYMBOL_07,
426 | Reels.SYMBOL_06, Reels.SYMBOL_01, Reels.SYMBOL_02,
427 | Reels.SYMBOL_01, Reels.SYMBOL_03, Reels.SYMBOL_04,
428 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_05,
429 | Reels.SYMBOL_05, Reels.SYMBOL_05, Reels.SYMBOL_04,
430 | Reels.SYMBOL_01, Reels.SYMBOL_07, Reels.SYMBOL_02,
431 | Reels.SYMBOL_01, Reels.SYMBOL_05, Reels.SYMBOL_04,
432 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_04,
433 | Reels.SYMBOL_02, Reels.SYMBOL_06, Reels.SYMBOL_03,
434 | Reels.SYMBOL_03, Reels.SYMBOL_03, Reels.SYMBOL_03,
435 | Reels.SYMBOL_03, Reels.SYMBOL_02, Reels.SYMBOL_05,
436 | Reels.SYMBOL_03, Reels.SYMBOL_05, Reels.SYMBOL_05,
437 | Reels.SYMBOL_03, Reels.SYMBOL_03, Reels.SYMBOL_02,
438 | Reels.SYMBOL_04, Reels.SYMBOL_02, Reels.SYMBOL_08,
439 | Reels.SYMBOL_01, Reels.SYMBOL_07, Reels.SYMBOL_07,
440 | Reels.SYMBOL_05, Reels.SYMBOL_06, Reels.SYMBOL_08,
441 | Reels.SYMBOL_04, Reels.SYMBOL_02, Reels.SYMBOL_01,
442 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_06,
443 | Reels.SYMBOL_03, Reels.SYMBOL_03, Reels.SYMBOL_03,
444 | Reels.SYMBOL_05, Reels.SYMBOL_01, Reels.SYMBOL_02,
445 | Reels.SYMBOL_04, Reels.SYMBOL_01, Reels.SYMBOL_03,
446 | Reels.SYMBOL_01, Reels.SYMBOL_04, Reels.SYMBOL_07,
447 | Reels.SYMBOL_03, Reels.SYMBOL_03, Reels.SYMBOL_01,
448 | Reels.SPECIAL_SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_03,
449 | Reels.SYMBOL_03, Reels.SYMBOL_02, Reels.SYMBOL_08,
450 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_08,
451 | Reels.SYMBOL_01, Reels.SYMBOL_06, Reels.SYMBOL_02,
452 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_03,
453 | Reels.SYMBOL_04, Reels.SYMBOL_05, Reels.SYMBOL_03,
454 | Reels.SYMBOL_05, Reels.SYMBOL_02, Reels.SYMBOL_04,
455 | Reels.SYMBOL_05, Reels.SYMBOL_04, Reels.SYMBOL_04,
456 | Reels.SYMBOL_09, Reels.SYMBOL_03, Reels.SYMBOL_06,
457 | Reels.SYMBOL_06, Reels.SYMBOL_04, Reels.SYMBOL_02,
458 | Reels.SYMBOL_03, Reels.SYMBOL_05, Reels.SYMBOL_02,
459 | Reels.SYMBOL_02, Reels.SYMBOL_01, Reels.SYMBOL_03,
460 | Reels.SYMBOL_02, Reels.SYMBOL_02, Reels.SYMBOL_01,
461 | Reels.SYMBOL_06, Reels.SYMBOL_08, Reels.SYMBOL_01,
462 | Reels.SYMBOL_06, Reels.SYMBOL_03, Reels.SYMBOL_09,
463 | Reels.SYMBOL_04, Reels.SYMBOL_04, Reels.SYMBOL_05,
464 | Reels.SYMBOL_01, Reels.SYMBOL_04, Reels.SYMBOL_01,
465 | Reels.SYMBOL_06, Reels.SYMBOL_02, Reels.SYMBOL_06,
466 | Reels.SYMBOL_07, Reels.SYMBOL_02, Reels.SYMBOL_02,
467 | Reels.SYMBOL_06, Reels.SYMBOL_02, Reels.SYMBOL_02,
468 | Reels.SYMBOL_03, Reels.SYMBOL_08, Reels.SYMBOL_06,
469 | Reels.SYMBOL_01, Reels.SYMBOL_01, Reels.SYMBOL_02,
470 | Reels.SYMBOL_01, Reels.SYMBOL_02, Reels.SYMBOL_02,
471 | Reels.SYMBOL_04, Reels.SYMBOL_04, Reels.SYMBOL_05,
472 | Reels.SYMBOL_03, Reels.SYMBOL_06, Reels.SYMBOL_03,
473 | Reels.SYMBOL_04, Reels.SYMBOL_05, Reels.SYMBOL_07,
474 | Reels.SYMBOL_02 } };
475 |
476 | /**
477 | * Select random symbols from reels' distribution. Fill the visible part of
478 | * reels with randomly choosed symbols from reels distribution. Initialize
479 | * every mechanic reel with three subsequent symbols from reel's
480 | * distribution.
481 | *
482 | * @param symbols
483 | * Contain random symbols.
484 | *
485 | * @return Selected random symbols from distribution.
486 | *
487 | * @author Qna Dimova
488 | *
489 | * @email q.dimova@gmail.com
490 | *
491 | * @date 09 Sep 2008
492 | */
493 | public void selectRandomSymbols(ReelSymbol symbols[][]) {
494 | for (int i = 0; i < ReelsBase.COLS; i++) {
495 | int r = Util.PRNG.nextInt(DISTRIBUTION_SIZE);
496 |
497 | for (int j = 0; j < ReelsBase.ROWS; j++) {
498 | int n = r - (ReelsBase.ROWS / 2) + j;
499 |
500 | if (n < 0) {
501 | symbols[i][j] = DISTRIBUTION[i][DISTRIBUTION_SIZE + n];
502 | } else if (n >= DISTRIBUTION_SIZE) {
503 | symbols[i][j] = DISTRIBUTION[i][n - DISTRIBUTION_SIZE];
504 | } else {
505 | symbols[i][j] = DISTRIBUTION[i][n];
506 | }
507 | }
508 | }
509 | }
510 | }
511 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 | {one line to give the program's name and a brief idea of what it does.}
635 | Copyright (C) {year} {name of author}
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | {project} Copyright (C) {year} {fullname}
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
676 |
--------------------------------------------------------------------------------