Git Product home page Git Product logo

mastermind's Introduction

Hi 👋 , I'm Romain Guarinoni

I'm a junior full stack developer

Let me introduce myself 👦

  • 🖥️ I’m currently working on FindAMusician, a web application for musicians in my school to help them meet, create bands and play at events.
  • 👨‍🎓 I'm a computer science student at Imt Nord Europe
  • 🎯 I want to contribute more to open source projects
  • 🎵 I'm a musician, I play drums, guitar and piano, and i really love talking about music
  • 👨‍💻 I'm a tech enjoyer and i really love discovering new technologies and talking about computer science in general
  • 🎮 I'm a really big fan of CS:GO

Main Technologies and Languages

Connect with me!


mastermind's People

Contributors

guillaume-faure avatar romainguarinoni avatar

Watchers

 avatar

mastermind's Issues

Apply params when hitting enter key

Description

It should be possible to apply parameters and close params popUp when the user hit the enter key. Use the <form> and the <button type="submit"> to achive this effect

Split the tests

Modify the tests to make sure each it(){} is testing only one aspect of the function

Update the name of the tests if needed

Make the style of the app better

Description

I think the game style is pretty basic, maybe find solution to make it better ( colors, general design ... )

Ideas

  • change font of the app ( use Roboto or smthing else) see: https://fonts.google.com/
  • Change bg color and line style
  • make a useOnClickOutside for poppin
  • #38

Add responsive

Description

Make the game responsive for all type of devices

Husky don't run

When commiting, these appear in the console :

astuce: Le crochet '.husky/pre-commit' a été ignoré parce qu'il n'est pas marqué comme exécutable.
astuce: Vous pouvez désactiver cet avertissement avec `git config advice.ignoredHook false`.

Wrong tooltip color

Description

When you set the nbTurns of the game to 2, the tooltip is green all the rounds, it should be orange and red

Make a user documentation

Description

We have to create a README documention for the user

Tasks

  • Explain the rules of the mastermind
  • Explain how to play solo
  • Explain how to create a multiplayer room
  • Explain how to join a multiplayer room
  • Explain the multiplayer rules and how to play it

Install jsdoc

https://dev.to/paulasantamaria/document-your-javascript-code-with-jsdoc-2fbf

  • add type in the jsdoc for each param like this : {String}

jsdoc.config:

{
  "opts": {
    "template": "node_modules/better-docs"
  },
  "plugins": [
    "node_modules/better-docs/typescript"
  ],
  "source": {
    "include": [
      "browser/src", "server/src"
    ],
    "includePattern": "\\.(jsx|js|ts|tsx)$"
  },
  "tags": {
    "allowUnknownTags": [
      "optional"
    ]
  }
}

what to install :

npm install --global jsdoc qunit
npm install --save-dev better-docs qunit @types/qunit

Make targets zone widder

Description

The zone where the user can drag a target is pretty small. It would be better if instead of using margin for spacing, we use padding, because the zone would be widder

store the best score in local storage

Description

Each best score of each category need to be store in the localStorage

Task

  • Create a good way to create key/value pair in the localStorage
  • At the end of each game, compare the time took by the player to finish the game and the best time store in localStorage in ther same category, if better, update the localStorage

Create a landing page

Description

when the user start the website, it should first redirect him to the landing page where he could choose :

  • to play solo
  • to create a multi player room
  • to join a multiplayer room

Tasks

  • Add an input to past an room ID
  • display error of the room does not exist ( result of the backend)
  • user have to enter a name
  • Add the game parameters before create a new room
  • Send a backend request to have the ID of the room created

Display the number of rounds left

Description

Display somewhere the number of round left to the user

Idea

We could display a tooltip over the verify button that say the number of rounds left when the user over the verify button.

Something like this :

add the possibility for the user to see his game after he win / loose

Description

Add a possibilty to close the win / loose popup witrhout start a new game to allow the user to see his game. A new button could make the win / loose popup re appear if needed

Tasks

  • Add a button on win / loose pop up to close it without start a new game
  • Make sure the verify button dont produce weird things when the win / loose popup is reduce
  • Change verify button to see the result instead

getCurrentCombination should not interact with DOM

As seen below, the function getCurrentCombination interact with the dom :

const currentTargetPiece = currentTargets[i].querySelector(
'div.target-piece',
) as HTMLDivElement;

Would be better to create a function in dom-manipulation.ts that returns the node element and then use it there !

We could use Mock function in test to mock the dependency

Choice number of colours available for the game

Description

Give the possibility to the player to choose the number of colours available for his game with a minimum of the number of possibilities and the maximum of the number of colours we created

Change code location

mastermind/src/index.ts

Lines 200 to 224 in d030c87

function displayWinPopup() {
(
document.getElementById('nb-round') as HTMLParagraphElement
).innerHTML = `Tu as trouvé la combinaison en ${currentRound} tours`;
winPopup.style.display = 'flex';
}
/**
* @description Add the game combination to the lose popup and display it
*/
function displaylosePopup() {
const solutionCombinaison = document.getElementById(
'solution-combination',
) as HTMLDivElement;
// Reset previous solution
solutionCombinaison.innerHTML = '';
for (let i = 0; i < gameCombination.length; i++) {
const div = document.createElement('div');
div.classList.add('piece', gameCombination[i]);
solutionCombinaison.appendChild(div);
}
losePopup.style.display = 'flex';
}

This code should be placed under dom-manipulation.ts

Set up the Pgsql database

Use typeORM !

Tasks

  • create a room table with id, created_at,
  • create player table with name, room, combination

Make a multiplayer mode

Description

Create a multiplayer mode when a player could create a private room for 2 player, each one would have to create a secret combination and the first one to find the other combination win the game.

Tasks

  • create a backend in express ( need more issues )
  • create html page to determine if the player is playing solo or multi
  • add the functionnality to join a room via pasting the link of a room
  • if multiplayer, add the functionality to create a combination for the other player
  • wait until the other player send his combination
  • play the game with the other combination
  • send a msg to the backend when finish
  • display a loose popup if the other finish before( when receiving a msg from the backend)

External links

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.