/slotMachine

A slot machine based on Paper.js

Primary LanguageJavaScript

This was written 15 (maybe 13-ish?) years ago when I started dabbling in JavaScript, I think.

This is by far the most badly written and ridiculous piece of shit I've ever written. It's also the most starred. There's also about 8 forks of it, most probably by people who thought they could extend it until they saw the source code.

That's a damn shame because the original implementation was doing some really bizarre shit with globals, trying to emulate an array-like list or something, because I didn't really know know how to work with Arrays. Enjoy

Demo: nicholaswmin.github.io/slotMachine

SlotMachine.js


  • Uses Paper.js - An HTML5 canvas wrapper for easier shape manipulation
  • Plug+Play - define your own fruit images in index.html
  • Uses Math.Random() to generate a seed.
Tech used
Changing the fruit images
  • Some images are already defined in index.html.
  • You can change their src's to the one's you want
  • Pay attention to the image id's/classes, widths & heights. Make sure you match them
Where are the results logged?
  • In the console
License

All Rights Reserved

Copyright (c) Nicholas Kyriakides

The receipt or possession of the source code and/or any parts thereof does not convey or imply any right to use them for any purpose other than the purpose for which they were provided to you.

The software is provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non infringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the software.

Author: Nicholas Kyriakides(@nicholaswmin)