PHP Classes
elePHPant
Icontem

PHP Virtual Slot Machine: Emulate a slot machine

Recommend this page to a friend!
  Info   View files View files (43)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2015-03-11 (3 years ago) RSS 2.0 feedStarStarStar 56%Total: 481 All time: 5,779 This week: 429Up
Version License PHP version Categories
vslot 1.0GNU General Publi...4.0Games
Description Author

This class can emulate a slot machine.

It can emulate pulling the handle discounting the user credits and picking 3 random symbols that will be results.

It uses weighted mapping from a virtual reel to a smaller physical reel, emulating real world slots with 3 reels and a center pay line.

The class can evaluate the results to determine if user won and add the respective amount of credits.

The class also display the symbols images that the user got on a Web page.

Innovation Award
PHP Programming Innovation award nominee
March 2015
Number 7


Prize: One downloadable copy of PhpED Professional
Slot machines are very popular games often present in casinos.

This class implements algorithms to emulate all steps necessary to implement a slot machine game play.

Manuel Lemos
  Performance   Level  
Name: Dave Smith is available for providing paid consulting. Contact Dave Smith .
Classes: 39 packages by
Country: United States United States
Age: 53
All time rank: 11412 in United States United States
Week rank: 8 Up1 in United States United States Up
Innovation award
Innovation award
Nominee: 26x

Winner: 6x

Details
vslot class - virtual slot machine
version 1.0 3/3/2015

Generates random slot machine results with weighted mapping from a virtual reel to a smaller 'physical' reel, emulating real world slots with 3 reels and a center pay line.

readme.txt - Installation instruction for the class and example script

Copyright (c) 2015, Wagon Trader all rights reserved.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

1) Upload all files to your server in the http root or web accessible folder.

2) Point your browser to the index.php file to play and examine sample slots included.
  Files folder image Files  
File Role Description
Files folder imagesymbols (37 files)
Plain text file class.vslot.php Class vslot Class
Accessible without login Plain text file index.php Aux. Landing page
Accessible without login Plain text file otherslots.php Example Slot generation
Accessible without login Plain text file play.php Example Example game play
Accessible without login Plain text file readme.txt Data Installation instructions
Accessible without login Plain text file test.php Example Default slot configuration testing

  Files folder image Files  /  symbols  
File Role Description
  Accessible without login Image file bell.jpg Data Slot bell symbol
  Accessible without login Image file bell.png Data Slot bell symbol
  Accessible without login Image file blank.jpg Data Slot blank image
  Accessible without login Image file cherry.jpg Data Slot cherry symbol
  Accessible without login Image file cherry.png Data Slot cherry symbol
  Accessible without login Image file diamond.jpg Data Slot diamond symbol
  Accessible without login Image file diamond.png Data Slot diamond symbol
  Accessible without login Image file emerald.jpg Data Slot emerald symbol
  Accessible without login Image file emerald.png Data Slot emerald symbol
  Accessible without login Image file goldbar.jpg Data Slot gold bar symbol
  Accessible without login Image file goldbar.png Data Slot gold bar symbol
  Accessible without login Image file goldclover.jpg Data Slot gold clover symbol
  Accessible without login Image file goldclover.png Data Slot gold clover symbol
  Accessible without login Image file goldseven.jpg Data Slot gold seven symbol
  Accessible without login Image file goldseven.png Data Slot gold seven symbol
  Accessible without login Image file grape.jpg Data Slot grape symbol
  Accessible without login Image file grape.png Data Slot grape symbol
  Accessible without login Image file greenbar.jpg Data Slot green bar symbol
  Accessible without login Image file greenbar.png Data Slot green bar symbol
  Accessible without login Image file greenclover.jpg Data Slot green clover symbol
  Accessible without login Image file greenclover.png Data Slot green clover symbol
  Accessible without login Image file heart.jpg Data Slot heart symbol
  Accessible without login Image file heart.png Data Slot heart symbol
  Accessible without login Image file horseshoe.jpg Data Slot horseshoe symbol
  Accessible without login Image file horseshoe.png Data Slot horseshoe symbol
  Accessible without login Image file lemon.jpg Data Slot lemon symbol
  Accessible without login Image file lemon.png Data Slot lemon symbol
  Accessible without login Image file plum.jpg Data Slot plum symbol
  Accessible without login Image file plum.png Data Slot plum symbol
  Accessible without login Image file redbar.jpg Data Slot red bar symbol
  Accessible without login Image file redbar.png Data Slot red bar symbol
  Accessible without login Image file redseven.jpg Data Slot red seven symbol
  Accessible without login Image file redseven.png Data Slot red seven symbol
  Accessible without login Image file ruby.jpg Data Slot ruby symbol
  Accessible without login Image file ruby.png Data Slot ruby symbol
  Accessible without login Image file watermelon.jpg Data Slot watermelon symbol
  Accessible without login Image file watermelon.png Data Slot watermelon symbol

 Version Control Unique User Downloads Download Rankings  
 0%
Total:481
This week:0
All time:5,779
This week:429Up
 User Ratings  
 
 All time
Utility:81%StarStarStarStarStar
Consistency:68%StarStarStarStar
Documentation:-
Examples:87%StarStarStarStarStar
Tests:-
Videos:-
Overall:56%StarStarStar
Rank:1717