Skip to content

joki20/dbwebb-mvc-proj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Scrutinizer Code Quality Code Coverage Build Status

Poker Squares

Introduction

In this project for the course MVC in web programming spring -21 I've made a game called Poker Squares. The aim of the game is to gather as many points as possible by playing out cards and create valuable poker hands. Score high and you might place yourself on top of the highscore list!

Poker Squares
     style; text-align: center

You can try the game here:

http://www.student.bth.se/~joki20/dbwebb-kurser/mvc/me/proj/public/

Rules

You have a grid consisting of 5x5 empty cells. Each turn a new card in the deck shows up and you have to click on one of the empty cells to place the card there. As soon as a row or column contains five cards, points for that poker hand is valued accordingly:

HAND POINTS EXPLAINATION
Royal Straight Flush 100 10 J Q K A in same suit
Straight Flush 75 Straight in same suit
Four of a kind 50 Four of same value
Full house 25 Three of the same value + Two pairs
Flush 20 All cards in the same suit
Straight 15 Cards with consecutive values
Three of a kind 10 Three of the same value
Two pairs 5 Two different pairs, each with same value
Two pairs 5 Two cards with same value

For a hand you can only score one of above. For example, If you have four of a kind, you will not also score for three of a kind.

Highscore

After you finished a game, you can go watch the highscore list and see where you placed. The list contains the name you chose at the start of the game and your total sum of all ten hands.

Histogram

In the histogram you can see the distribution of all previous hands played, in every game played (10 hands for each game). In this way you can analyze how common it is to score different kind of hands. For example, in time you can expect a Straight Flush to score less often compared to three of a kind since it is much harder to get.

Download the game

To run this repository you need:

  • Cygwin
  • Git
  • PHP in your path
  • Composer (package manager for PHP)
  • XAMPP
  • MySQL WorkBench

Setup environment

  1. Install Cygwin here

  2. Install Git here. Select option "Use Git from the Windows Command Prompt", and then option "Checkout as-is, commit as-is" in order to not affect your files automatically. Check that git is installed in Cygwin by typing git --version

  3. Make sure PHP is in your PATH: https://dbwebb.se/kunskap/lagg-php-i-pathen

  4. Download Composer here

  5. Download XAMPP here and follow this guide

Check that it works by typing make --version

  1. Download MySQL Workbench here

Download and run repository

  1. Make sure XAMPP is running on port 8080 with MySQL.

  2. Click menu option 'Code' and copy the HTTPS or SSH link to this git and then type either of the following inside folder C:/xampp/htdocs in your terminal:

This creates a directory dbwebb-mvc-proj in that folder, containing all the files for this repository.

  1. Go to this folder and type composer install to download all php packages specified inside composer.json

  2. Rename file env.example to .env

  3. Start MySQL Workbench as 'root' user, no password and port 3306. These details can be found in the .env file. Run the file database/pokerhighscores.sql in order to setup the database and its table. It will create a database called 'joki20'.

  4. You might have to run the command php artisan key:generate

  5. Start playing the game by going to http://localhost:8080/dbwebb-mvc-proj/ and click 'public' folder

About

Game of Poker Squares

Resources

Stars

Watchers

Forks

Packages

No packages published