Skip to content

Commit

Permalink
init: project
Browse files Browse the repository at this point in the history
  • Loading branch information
aneeshpanda committed Sep 30, 2021
1 parent ba693c0 commit a2f3e52
Show file tree
Hide file tree
Showing 15 changed files with 106 additions and 42 deletions.
19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE/epic_issue.md

This file was deleted.

19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
---

**Please describe the feature you want this project to offer**
A clear and concise description of what the problem is.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered (Optional)**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context (Optional)**
Add any other context or screenshots about the feature request here.
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/small_issue.md

This file was deleted.

1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
13 changes: 10 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import React from "react";
import "./App.css";

function App() {
return <div className="App">Hangman</div>;
}
const App = () => {
/* Import Words from helpers, use a Math.random to get a word */
return (
<div className="App">
Hangman{" "}
{/* Maintain a state for correct letters, wrong letters, remaining letters. For this, the letters component and the hangman component along with guessing should be imported. Import Guessing as well, to know what letters are correct.
Wrong letters is passed as a prop to HangmanFigure Component. */}{" "}
</div>
);
};

export default App;
12 changes: 12 additions & 0 deletions src/components/guessing/Guessing.component.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from "react";

const Guessing = () => {

return (
<div>
{/*Display only the correct letters that are clicked. The Correct Letters will be passed from App.jsx.*/}
</div>
);
};

export default Guessing;
1 change: 1 addition & 0 deletions src/components/guessing/guessing.styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/*Add required CSS guessing component*/
9 changes: 9 additions & 0 deletions src/components/hangmanFigure/HangmanFigure.component.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from "react";

const HangmanFigure = () => {
<div>
{/*Implement a basic Hangman Image that moves on every error. Pass Wrong Letters as a prop and check the length to render an appropriate image.*/}
</div>;
};

export default HangmanFigure;
1 change: 1 addition & 0 deletions src/components/hangmanFigure/hangmanFigure.styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/*Add required CSS hangmanFigure component*/
14 changes: 14 additions & 0 deletions src/components/letter/Letter.component.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React, { useState } from "react";

const Letter = () => {
const [clicked, setClicked] = useState(false);
/*Get the value of the alphabet as props from Letters component and add Letter component*/
/*create a handleonClick function that changes the state to true.*/
return (
<div>
{/*Value of the alphabet, change the state when the letter is clicked*/}
</div>
);
};

export default Letter;
1 change: 1 addition & 0 deletions src/components/letter/letter.styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/*Add required CSS in letter component*/
11 changes: 11 additions & 0 deletions src/components/letters/Letters.component.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

const Letters = () => {
return (
<div>
{/*Get the letters of the english alphabet from the helpers. Pass each alphabet to the letter component with the help of a map function.*/}
</div>
);
};

export default Letters;
1 change: 1 addition & 0 deletions src/components/letters/letters.styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/*Add required CSS in letters component*/
22 changes: 22 additions & 0 deletions src/utils/helpers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export const checkWinner = (correct, wrong, word) => {
/*Define condition for win and loop it.*/
/*Define condition for lose*/
};

export const alphabets = () => {
/*Get alphabets of the English language*/
};

export const words = () => {
return [
"IEEEVIT",
"Hacktoberfest",
"GitHub",
"Git",
"FOSS",
"OpenSource",
"VIT",
];

/*Import this in Guessing component and use it.*/
};

0 comments on commit a2f3e52

Please sign in to comment.