GithubHelp home page GithubHelp logo

mobile-mines's People

Contributors

aizkhaj avatar neidley avatar nickisaacs avatar

Stargazers

 avatar

Watchers

 avatar

mobile-mines's Issues

Change whew.png

Look at src/img/whew.png.
Look at src/img2/whew.png.

Using these for reference, create your own appropriate image
and replace src/img/whew.png with a creation of your own.

Create a win-loss scoreboard

I previously tried implementing a scoreboard by assigning an array variable like so in src/components/Gameboard.js

class Gameboard extends Component {
  onClick(e) {
    e.preventDefault();

    let mine = e.target;
    let url = e.target.src;
    let scoreboard = [0,0];

However, upon hitting the play button, it refreshes the page thus also resetting the scoreboard variable to [0,0].

This feature will be easier after Redux is implemented.

Change lookout.png

Look at src/img/lookout.png.

Using this for reference, create your own appropriate image
and replace src/img/lookout.png with a creation of your own.

randomMine should be reset when Play button is pressed

randomMine selects a random number 1 - 5,
to determine which mine will be armed to explode if clicked.

Currently it is only reset upon window refresh,
but we also want it to be reset every time the play button is pressed.

This should be a good starting place, here in Provider.js where it is currently set within DEFAULT_STATE -

const DEFAULT_STATE = {
  message: "Good Luck",
  minesRemaining: 4,
  gameEnded: false,
  randomMine: `mine_${Math.floor(Math.random() * 5) + 1}`,
  mines
};

Play button should reload Gameboard component, not refresh page

This will require implementing Redux.

Refer to src/components/Play.js, specifically the .onClick(e) function to alter the button behavior
after mapStateToProps and PropTypes have been added.

For information on these concepts, here's a good place to start:

https://redux.js.org/basics/usage-with-react

https://stackoverflow.com/questions/38202572/understanding-react-redux-and-mapstatetoprops

React JS / Redux Tutorial - 7 - mapStateToProps -
https://www.youtube.com/watch?v=IIMUXbkKzW0

Set number of rows of mines to defuse (1, 2, or 3)

User should be able to select how many rows of mines they would like to defuse: 1, 2, or 3.

They could be 3 buttons labeled Easy, Medium, Hard.

There should be one randomMine or explosive mine per row that results in a loss for the whole game.

Prepare React app for Production

Using dev tools React extension in Google Chrome, place cursor over the React Developer Tool icon in the extension bar. Click and see that:

This page is using the development build of React. ๐Ÿšง

Note that the development build is not suitable for production. 
Make sure to use the production build before deployment.

Open the developer tools, and the React tab will appear to the right.

Here's a link with instructions to prepare a React app for production:
https://reactjs.org/docs/optimizing-performance.html#use-the-production-build

Once you make the change and everything's running locally,

  1. Create a Pull-Request and include a screenshot of the React Developer Tool displaying that the app is running in production mode.
  2. Reference the PR in this Issue's chat and
  3. Get your contribution merged!

Change explosion.png

Look at src/img/explosion.png.
Look at src/img2/explosion.png.

Using these for reference, create your own appropriate image
and replace src/img/explosion.png with a creation of your own.

Change Background

In src/App.css, look for the body styling:

body {
  padding-top: 25px;
  background: url('../src/img/underwater.png') no-repeat;
  background-size: 1280px 853px;
}

Find (non-copyright) or create a new background and replace src/img/underwater.png with it.

CSS Mine sway animation should be a loop, not have a jerk reset

reference mobile-mines/client/App.css

// lines 25 - 38

@keyframes App-logo-spin {
  from {
    transform: rotate(-45deg);
  }
  to {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-90deg);
  }
  to {
    transform: rotate(45deg);
  }
}

This animation was originally the React logo spin animation you see when you first create a React app

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.