Skip to content

Commit 59c2423

Browse files
authored
Merge branch 'thinkswell:master' into master
2 parents b51368b + 3119687 commit 59c2423

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+8920
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<img src="https://img.shields.io/github/issues/thinkswell/javascript-mini-projects.svg?style=for-the-badge&logo=appveyor" alt="Issue"/>
1515
</a>
1616
<a href="https://github.com/thinkswell/javascript-mini-projects/pulls" target="blank">
17-
<img src=" https://img.shields.io/github/issues-pr/thinkswell/javascript-mini-projects.svg?style=for-the-badge&logo=appveyor" alt="Open Pull Request"/>
17+
<img src="https://img.shields.io/github/issues-pr/thinkswell/javascript-mini-projects.svg?style=for-the-badge&logo=appveyor" alt="Open Pull Request"/>
1818
</a>
1919
</p>
2020

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Stone Paper Scissors Game
2+
3+
Description:
4+
5+
This is a JavaScript project that allows users to play the popular game of Stone Paper Scissors online. The project uses HTML, CSS, and JavaScript to create a responsive and interactive game interface that can be played on desktop and mobile devices.
6+
7+
## Features
8+
9+
The main features of the project include:
10+
11+
1. User-friendly interface with simple and intuitive game controls
12+
13+
2. Single-player mode that allows users to play against the computer with varying levels of difficulty
14+
15+
3. Real-time game feedback with scores and game status updates
16+
17+
This project provides a fun and engaging way for users to play Stone Paper Scissors online. It is easy to set up and can be customized to suit individual preferences. Feel free to clone this repository and contribute to the development of the project.
18+
19+
## How to play
20+
21+
To play the game, follow these steps:
22+
23+
1. Open the game page on your browser.
24+
25+
2. Choose your move (stone, paper, or scissors).
26+
3. Wait for the opponent (or computer) to choose their move.
27+
4.The winner is determined based on the game rules (stone beats scissors, paper beats stone, scissors beat paper).
28+
4. The game continues until 5 moves.
29+
30+
## Contributing
31+
32+
We welcome contributions to this project. If you have any ideas or suggestions for new features, feel free to submit a pull request or create an issue.
33+
34+
## Tech Stack
35+
36+
**Server:** javascript
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
console.log("------GAME ON-----")
2+
console.log("\n ((Match of 5 Round's)) ")
3+
console.log("\n**ENTER TYPE: Paper; Stone ; Scissor**")
4+
let userScore=0
5+
let computerScore=0
6+
let i=0
7+
var arrStr = ['Stone','Paper','Scissor']
8+
while(i<5){
9+
10+
let user = prompt("*\nEnter your Move:")
11+
var randElement = arrStr[Math.floor(Math.random() * 3)];
12+
13+
console.log("Computer's move: ",randElement);
14+
15+
if(user==randElement){
16+
console.log("Draw")
17+
userScore++
18+
computerScore++
19+
}
20+
21+
else if(user=="Stone" && randElement=="Paper" || user=="Paper" && randElement=="Stone" || user=="Stone" && randElement=="Paper" || user=="Scissor" && randElement=="Paper" || user=="Stone" && randElement=="Scissor"){
22+
userScore++
23+
}
24+
25+
else{
26+
computerScore++
27+
}
28+
29+
console.log("\nUserSCore ",userScore," ComputerSCore ",computerScore)
30+
31+
i++
32+
console.log("\n")
33+
}
34+
35+
36+
if(userScore>computerScore){
37+
console.log("RESULTS : Congratualtion!! You Won it!!")
38+
}
39+
else if(userScore<computerScore){
40+
console.log("RESULTS : Sorry!!! You Lost it!!")
41+
}
42+
else{
43+
console.log("RESULTS : ----It's a Draw----")
44+
}

WeatherApp/djv03/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
config.js

WeatherApp/djv03/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Project Name
2+
3+
MyWheather App
4+
![Alt text](image.png)
5+
## Table of Contents
6+
7+
- [Getting Started](#getting-started)
8+
- [Usage](#usage)
9+
- [Contributing](#contributing)
10+
- [License](#license)
11+
12+
## Getting Started
13+
14+
These instructions will help you get your project up and running.
15+
16+
### Step 1: Get your Keys
17+
18+
go to [rapidapi.com](https://rapidapi.com/apininjas/api/weather-by-api-ninjas/) and sign up and copy key from given code snippets which would be(as of writing this now) on left side of page
19+
20+
### Step 2: Make configuration
21+
22+
make config.js file in /WheatherApp and add you api key in place of 'your_key_here' from given code snippet below
23+
```javascript
24+
var config = {
25+
API_KEY:'your_key_here'
26+
}
27+
```
28+
### Step 3: Run
29+
now to go to index.html and run either by Live server(if you have extension) or copy path to index.html of /WheatherApp and paste in into your browser

WeatherApp/djv03/image.png

55.6 KB
Loading

WeatherApp/djv03/index.html

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<meta name="theme-color" content="#712cf9">
8+
<title>MyWhether.com</title>
9+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet"
10+
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
11+
<link rel="canonical" href="https://getbootstrap.com/docs/5.2/examples/pricing/">
12+
<link href="/docs/5.2/dist/css/bootstrap.min.css" rel="stylesheet"
13+
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
14+
15+
<!-- Favicons -->
16+
<link rel="apple-touch-icon" href="/docs/5.2/assets/img/favicons/apple-touch-icon.png" sizes="180x180">
17+
<link rel="icon" href="/docs/5.2/assets/img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
18+
<link rel="icon" href="/docs/5.2/assets/img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
19+
<link rel="mask-icon" href="/docs/5.2/assets/img/favicons/safari-pinned-tab.svg" color="#712cf9">
20+
21+
22+
<link rel="stylesheet" href="./style.css">
23+
</head>
24+
25+
<body>
26+
<div class="main">
27+
<!-- HTML of Navbar starts here -->
28+
<nav class="navbar navbar-expand-lg ">
29+
<div class="container-fluid">
30+
<a class="navbar-brand fw-bold" href="#">MyWhether</a>
31+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
32+
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
33+
<span class="navbar-toggler-icon"></span>
34+
</button>
35+
<div class="collapse navbar-collapse" id="navbarSupportedContent">
36+
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
37+
38+
39+
40+
</ul>
41+
<button class="btn btn-outline-success">add your city</button>
42+
43+
</div>
44+
</div>
45+
</nav>
46+
<form class="d-flex searchcontainer" role="search">
47+
<input id="city" class="form-control me-2 " type="search" placeholder="Search your city here" aria-label="Search">
48+
<button class="btn btn-outline-success" type="submit" id="submit">Search </button>
49+
</form>
50+
51+
52+
<!-- HTML of main body starts here -->
53+
<main>
54+
<div class="text-center my-4 fs-1 fw-normal">Wheather of
55+
<div id="loader" class="loader"></div>
56+
<span style="color: rgb(14, 14, 126) ;font-weight: bold;"id="cityName" class="fw-bold ">
57+
58+
</span>
59+
</div>
60+
<div class="d-flex flex-column flex-sm-row ">
61+
62+
<div class="col card-width cards ">
63+
<div class="card m-4 rounded-3 shadow-sm d-flex flex-col justify-content-center align-items-center ">
64+
<div class="w-full card-header py-3 border ">
65+
<h4 class="my-0 fw-normal">Temprature</h4>
66+
</div>
67+
<div class="card-body">
68+
<h1 class="card-title pricing-card-title"><span id="temp"></span><small
69+
class="text-muted fw-light"> <span>&#8451;</span> </small></h1>
70+
<ul class="list-unstyled mt-3 mb-4">
71+
<li></li>
72+
73+
</ul>
74+
75+
</div>
76+
</div>
77+
</div>
78+
<div class="col card-width cards">
79+
<div class="card m-4 rounded-3 shadow-sm d-flex flex-col justify-content-center align-items-center ">
80+
<div class="card-header py-3">
81+
<h4 class="my-0 mx-4 fw-normal ">Wind</h4>
82+
</div>
83+
<div class="card-body">
84+
<h1 class="card-title pricing-card-title"><span id="wind_speed"></span><small class="text-muted fw-light">
85+
km/hr</small></h1>
86+
<ul class="list-unstyled mt-3 mb-4">
87+
<li></li>
88+
89+
</ul>
90+
91+
</div>
92+
</div>
93+
</div>
94+
<div class="col card-width cards">
95+
<div class="card m-4 rounded-3 shadow-sm d-flex flex-col justify-content-center align-items-center ">
96+
<div class="card-header py-3 ">
97+
<h4 class="my-0 fw-normal">humidity</h4>
98+
</div>
99+
<div class="card-body">
100+
<h1 class="card-title pricing-card-title"><span id="humidity"></span><small
101+
class="text-muted fw-light">%</small></h1>
102+
<ul class="list-unstyled mt-3 mb-4">
103+
<li> </li>
104+
105+
</ul>
106+
107+
</div>
108+
</div>
109+
</div>
110+
<div class="col card-width cards">
111+
<div class="card m-4 rounded-3 shadow-sm d-flex flex-col justify-content-center align-items-center ">
112+
<div class="card-header py-3 ">
113+
<h4 class="my-0 fw-normal">Min temp</h4>
114+
</div>
115+
<div class="card-body">
116+
<h1 class="card-title pricing-card-title"><span id="min_temp"></span><small class="text-muted fw-light"><span>&#8451;</span>
117+
</small></h1>
118+
<ul class="list-unstyled mt-3 mb-4">
119+
<li> </li>
120+
121+
</ul>
122+
123+
</div>
124+
</div>
125+
</div>
126+
<div class="col card-width cards">
127+
<div class="card m-4 rounded-3 shadow-sm d-flex flex-col justify-content-center align-items-center ">
128+
<div class="card-header py-3 ">
129+
<h4 class="my-0 fw-normal">Max temp</h4>
130+
</div>
131+
132+
<div class="card-body">
133+
<h1 class="card-title pricing-card-title"><span id="max_temp"></span><small class="text-muted fw-light">
134+
<span>&#8451;</span></small></h1>
135+
</div>
136+
</div>
137+
</div>
138+
</div>
139+
140+
<!-- HTML of city wheather table starts here -->
141+
<div class="table-responsive">
142+
<table class="table text-center">
143+
<thead>
144+
<tr>
145+
<th style="width: 14%;" class="mx-auto"></th>
146+
<th style="width: 12%;">Temprature</th>
147+
<th style="width: 12%;">Wind</th>
148+
<th style="width: 12%;">humidity</th>
149+
</tr>
150+
</thead>
151+
<tbody>
152+
<tr>
153+
<th scope="row" class="text-start">Delhi</th>
154+
<td><span id="delhi_temp"></span></td>
155+
<td><span id="delhi_wind_speed"></span></td>
156+
<td><span id="delhi_humidity"></span></td>
157+
</tr>
158+
<tr>
159+
<th scope="row" class="text-start">London</th>
160+
<td><span id="london_temp"></span></td>
161+
<td><span id="london_wind_speed"></span></td>
162+
<td><span id="london_humidity"></span></td>
163+
</tr>
164+
</tbody>
165+
166+
<tbody>
167+
<tr>
168+
<th scope="row" class="text-start">New York</th>
169+
<td><span id="newyork_temp"></span></td>
170+
<td><span id="newyork_wind_speed"></span></td>
171+
<td><span id="newyork_humidity"></span></td>
172+
</tr>
173+
<tr>
174+
<th scope="row" class="text-start">Tokyo</th>
175+
176+
<td><span id="tokyo_temp"></span></td>
177+
<td><span id="tokyo_wind_speed"></span></td>
178+
<td><span id="tokyo_humidity"></span></td>
179+
180+
181+
</tbody>
182+
</table>
183+
</div>
184+
</main>
185+
186+
187+
<!-- footer starts here -->
188+
</div>
189+
<footer class="text-center ">
190+
<hr class="m-auto mt-4" style="width: 50%">
191+
Made using <a style="text-decoration: none;" href="https://rapidapi.com/" target="_blank">rapidapi.com</a> by <a style="text-decoration: none;" href="https://github.com/djv03" target="_blank">Dhruvin</a>
192+
</footer>
193+
</div>
194+
195+
<!-- linking Javascript file -->
196+
<script type='text/javascript' src='config.js'></script>
197+
<script src="./script.js"></script>
198+
</body>
199+
200+
</html>

0 commit comments

Comments
 (0)