Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduced amount of symbols to increase likelyhood of winning / gamer r… #135

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/js/Slot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ export default class Slot {
constructor(domElement, config = {}) {
Symbol.preload();

//Swapped death_stars to randomness @ beginning page
this.currentSymbols = [
["death_star", "death_star", "death_star"],
["death_star", "death_star", "death_star"],
["death_star", "death_star", "death_star"],
["death_star", "death_star", "death_star"],
["death_star", "death_star", "death_star"],
["death_star", "c3po", "death_star"],
["stormtrooper", "death_star", "c3po"],
["death_star", "c3po", "death_star"],
["c3po", "death_star", "stormtrooper"],
["stormtrooper", "c3po", "death_star"],
];

this.nextSymbols = [
Expand Down Expand Up @@ -72,7 +73,7 @@ export default class Slot {
this.config.onSpinEnd?.(symbols);

if (this.autoPlayCheckbox.checked) {
return window.setTimeout(() => this.spin(), 200);
return window.setTimeout(() => this.spin(), 300);
}
}
}
11 changes: 6 additions & 5 deletions src/js/Symbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ export default class Symbol {
Symbol.symbols.forEach((symbol) => new Symbol(symbol));
}

// Here I reduced the amount of symbols to randomnize to increase likelyhood of winnning
static get symbols() {
return [
"at_at",
// "at_at",
"c3po",
"darth_vader",
// "darth_vader",
"death_star",
"falcon",
"r2d2",
// "falcon",
// "r2d2",
"stormtrooper",
"tie_ln",
// "tie_ln",
"yoda",
];
}
Expand Down