Skip to content

Instantly share code, notes, and snippets.

@jshanson7
jshanson7 / LodashSlotMachine.js
Last active September 25, 2015 01:08
LodashSlotMachine -- example lodash `_.consists` usage
// Example lodash `consists` usage -- does the current payline "consist" of
// the same symbols as any of the payouts? See `getCurrentReward()` method.
import { consists, assign, map, find, result, sample } from 'lodash';
// example symbols -- can be anything, and of any type
const [Bar, Cherry, Seven] = ['bar', 'cherry', 'seven'];
export default class LodashSlotMachine {
reels = [
// example reels