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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ Javascript app to help people get used to navigation in vim by gamifying it. Pla
* `w` to move to the next word
* `e` to move to the end of the current word (next word if the cursor is hovering whitespace/end of the current word)
* `b` to move to the beginning of the current word (previous word if the cursor is hovering whitespace/beginning of current word)

## Music
* http://www.bensound.com/royalty-free-music/track/sci-fi
2 changes: 1 addition & 1 deletion css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ body {
height: 27px;

text-align: right;
}
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zseiman add a newline.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zseiman I think you accidentally removed this. haha

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! Sorry about that. Have to work on my code cleanliness. This is my first attempt at contribution and I'm pretty nervous about it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relax. You're doing fine! 👍

13 changes: 13 additions & 0 deletions css/utility.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,16 @@
.score:after {
content: ',';
}

#mute{
position:absolute;
margin-top:-240px;
margin-left:556px;
width:50px;
height:50px;

background-image: url(../images/mutedButton.png);
}
#mute:hover{
background-image: url(../images/muteButton.png);
}
Binary file added images/muteButton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mutedButton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
<link href='css/letters.css' rel='stylesheet' type='text/css'>
</head>
<body>
<div id="mute">
<audio id="sound" autoplay loop>
<source src="music\bensound-scifi.mp3" type="audio/mpeg">
</audio>
</div>
<div class='console'>
<div class='main-container'>
<div class='main-line line1'></div>
Expand All @@ -32,11 +37,13 @@
</div>
</div>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src='js/init.js'></script>
<script src='js/game.js'></script>
<script src='js/main.js'></script>
<script src='js/listeners.js'></script>
<script src='js/commands.js'></script>
<script src='js/music.js'></script>
</body>
</html>
1 change: 0 additions & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function Main(){
this.isStarted = false;
}


Main.prototype._showGameOver = function(){
var _this = this,
initializer = new Initializer();
Expand Down
14 changes: 14 additions & 0 deletions js/music.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$(function(){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zseiman can you fix the indentations here? thanks!


var audio = document.getElementById('sound');

function musicSwitch(){
if(audio.paused){
audio.play();
}
else{
audio.pause()
}
}
document.getElementById('mute').addEventListener('click', musicSwitch);
});
Binary file added music/bensound-scifi.mp3
Binary file not shown.