Skip to content

mickymacirl/CI-P2-Fruit

Repository files navigation

Match 2 Fruit Game

Match 2 Fruit is a memory game where you match two fruits. You flip the first card and try to find its match by choosing a second card. Once you match two fruits, continue to flip each card and match fruit types until the board is complete. The score has two elements, time and moves.

Mock Up

View the live site: here

Features of Website

Header

  • The website has a fixed header with the Match 2 Logo aligned left and it is responsive on all device sizes.
  • The fixed header will be displayed throughout the website.

Header Readme

NavBar

  • The navigation links to the Home and the Feedback page and is responsive on all device sizes.
  • Users can navigate between each page of the site, having consistent menu placement on the different screen sizes.

Navbar Readme Responsive

Footer

  • The website has a fixed footer describing the programs the site was designed in, with a link to each that opens on a new page.
  • Users will be able to find additional information about the programs used.

Footer Readme

Index Page

  • The Index page has a centred box with the game's rules and a button to start the game.
  • Users can find information about the game's rules and a play button.

Index 320 Readme

Index 700 Readme

Game Page

  • The Game Page contains the main game board, header, and footer.

Game 320 Readme

Game 700 Readme

Feedback Page

  • The Feedback page has a centred contact form with a submit button.
  • Users can contact the site owners through the contact form.

Feedback 320 Readme

Feedback 700 Readme

Confirm Page

Confirm 320 Readme

Confirm 700 Readme

404 Page

  • The 404 page has a centred box with a message that the page isn’t available.
  • Users will know what to do if they try to access a non-existing page.
  • Access the 404.html page: here

404 320 Readme

404 700 Readme

Game Board

  • The Main Game Board has a Start button that disables with a grey color when the board is active, with the number of moves taken so far and the time since either clicking on the start button or turning the first card, both displayed above the random grid of Cards.

Start Button Active

Start Button Disabled

  • The Main Game Board (game.html) is a 4x4 set of cards that can be turned with a mouse click, clicking a second card to try to find the fruit match. If unsuccessful, both unmatched turned cards revert to being unturned.

Successful Match Two Fruit

Grid Readme

  • The Main Game Board has a Play Again button which links back to Index.html.

Play Again Readme

Features to be Added

  • A user tracking system.
  • A scoreboard of past visits.
  • An option to choose a specific size of the main game board.

Design Choices

Fruit Emoji

  • The following Emoji were used to fill the main game board using the generateGame function randomly:
EMOJI Unicode Hex HTML Dec Value Image
Grapes U+1F347 &#127815 Fruit Emoji 127815
Banana U+1F34C &#127820 Fruit Emoji 127820
Strawberry U+1F353 &#127827 Fruit Emoji 127827
Green Apple U+1F34F &#127823 Fruit Emoji 127823
Pineapple U+1F34D &#127821 Fruit Emoji 127821
Tangerine U+1F34A &#127818 Fruit Emoji 127818
Coconut U+1F965 &#129381 Fruit Emoji 129381
Tomato U+1F345 &#127813 Fruit Emoji 127813
Mango U+1F96D &#129389 Fruit Emoji 129389
Cherries U+1F352 &#127826 Fruit Emoji 127826

Back of Card Image

  • From the Site Logo, created a back of the card image to display the card front before a card is flipped.

Card Back

Colors

  • The website, logo and text effects use the following colors, which go together well.

  • Forest Green Traditional, Marigold and Golden Poppy.

Colors Website

Fonts

  • The below fonts look well together on the page and suit the look and feel of the website.

  • Used the font Muli from Adobe Fonts for the main text of the website and buttons.

Muli Font

  • Muli is no longer listed under Google Fonts but can still be imported for use with a website; an explanation is found here.

Logo

  • The logo was designed to fit the theme of a fruit matching game.

Logo Fonts

Favicon

Image from Logo used for Favicon

Wireframes

Landing Page Wireframe

Index Page 320

Index Page 700

Game Page Wireframe

Game Page 320

Game Page 700

Feedback Page Wireframe

Feedback Page 320

Feedback Page 700

Confirm Page Wireframe

Confirm Page 320

Confirm Page 700

404 Page Wireframe

404 Page 320

404 Page 700

User Goals

  • Visually attractive game website.
  • It is easy to navigate the website.
  • Can see my moves and time easily.

User Stories

  • As a user, I want instructions on how to play the game.
  • As a user, I want to enjoy the game.
  • As a user, I want to view how many moves I've made, and the time it's taken.
  • As a user, I want the option to play the game again after one game ends.

Site Owner Goals

  • To create a website that is easy to navigate.
  • To create an appealing website that a user will want to visit.

Technology

HTML

  • The structure of this website uses HTML.

CSS

  • The website was styled by connecting a custom CSS to an external file.

JavaScript

  • This website's game board uses JavaScript to an external file.

Visual Studio Code

GitHub

Adobe Photoshop

Adobe Dreamweaver

Google Fonts

balsamiq

  • Created wireframes for this website using balsamiq.

Testing

Deployment

Template

Version Control

Both Visual Studio code editor and GitPod were used to create this site and then pushed to the GitHub remote repository named ‘CI-P2-Fruit’.

The following commands were used to push code to the remote repository:

  1. git add . was used to stage all files for commit changes.

  2. git commit -m “commit message” was used to add the changes to the local repository for upload during a push.

  3. git push was used to push all local changes to the remote repository on GitHub.

Deployment to GitHub Pages

The site was deployed to GitHub Pages.

Below are the steps required:

  1. In GitHub, navigate to your username.github.io repository and click Settings.
  2. Within Settings, navigate to the Source section within the GitHub Pages section. From the dropdown menu, select the master branch and then click Save.

Deploying New Changes

Once GitHub Pages is set up, normal GithHub flow updates the live page.

View the live site: here

Forking the Repository

Forking creates a copy of the repository to view and/or make changes without affecting the original.

Below are the steps required:

  1. In GitHub, access the specific GitHub Repository - Match 2 Fruit Game
  2. You will find and click the "Fork" button on the top right of the repository page underneath the user icon.
  3. You will have successfully created a copy of the original repository within the logged-in GitHub account.

Clone the 'CI-P2 Fruit Game' GitHub Code Repository locally

  1. Go to the page of the repository that you want to clone, the CI-P2 GitHub site: here
  2. Click on the “Code” menu and copy the URL.
  3. Use the git clone command along with the copied URL.
  4. git clone https://github.com/USERNAME/REPOSITORY

Clone Repository

Clone Repository Copied

Credits

Mentor Support

Markdown Language

Markdown Table Generator

Markdown TOC Generator

Meta Tags

W3 Schools Media Queries

Sticky Header and Footer

WebTips.Dev Memory Game

Grid Template Columns

Fruit Emojis

Code Institute Form Dump

JavaScript Basics

Favicon Generator

W3 School Responsive Web Design - Images

Mozilla.org Reference

Adobe Fonts

Unicorn Revealer

Chrome Dev Tools

  • Used Chrome Dev tools to debug code and troubleshoot layout and responsiveness.

Media Genius

  • Used Media Genius responsiveness website to troubleshoot layout and responsiveness.

markdownlint

  • Used MarkdownLint extension in Visual Studio to troubleshoot markdown errors in readme's.

GitLens 12

  • Used GitLens 12 extension in Visual Studio to help overall Git management.

CSS3 2D Transforms

  • Used CanIuse? to troubleshoot translate/transform in Safari.

LambDaTest Safari

Grammarly Office Plugin

Git and GitHub

GitPod

Multi-Device Website Mockup Generator

Version Control Reference

  • Used Our Coding Club GitHub.io How To's for reference.

Content