Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# Software Engineering 101 - Intro to Coding
1. git clone *link*
2. cd into file
3. make changes, git add ...
4. git commit -m ...
5. git push
6. make pull req
32 changes: 30 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
var generate = function () {
const words = ["banana", "chisel", "faucet"];
var select = words[Math.floor(Math.random() * words.length)];
return select;
};

var word = generate();
var gamesWon = 0;
var guesses = 0;

var main = function (input) {
var myOutputValue = 'hello world';
return myOutputValue;
if (input == word) {
gamesWon += 1;
guesses +=1;
word = generate();
if (gamesWon == 2) {
return "Game Reset " + "Your Guess: " + input + " The word: " + word + " Games Won: " + gamesWon;
}
else {
return "Your Guess: " + input + " The word: " + word + " Games Won: " + gamesWon;

}

}
else{
guesses = 0;
gamesWon = 0;
word = generate();
return "That was incorrect. "+ "Your Guess: " + input + " The word: " + word + " Games Won: " + gamesWon;
}

};