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 (4 years ago) RSS 2.0 feedStarStarStar 56%Total: 567 This week: 2All time: 5,286 This week: 184Up
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  
Innovation award
Innovation award
Nominee: 29x

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

 Version Control Unique User Downloads Download Rankings  
 0%
Total:567
This week:2
All time:5,286
This week:184Up
 User Ratings  
 
 All time
Utility:81%StarStarStarStarStar
Consistency:68%StarStarStarStar
Documentation:-
Examples:87%StarStarStarStarStar
Tests:-
Videos:-
Overall:56%StarStarStar
Rank:1742