Skip to content

Commit 2768593

Browse files
committed
Refactor Snakes 2 game section in index.html and remove obsolete Snakes2.html file
1 parent e27dfb4 commit 2768593

4 files changed

Lines changed: 32 additions & 28 deletions

File tree

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,10 @@ <h3 class="featurette-heading">Database Management System <br /><span class="tex
287287

288288
<div class="row featurette">
289289
<div class="col-sm-7">
290-
<h3 class="featurette-heading">Java Applets <br /><span class="text-muted">Snakes 2 Game</span></h3>
291-
<p class="lead">A 2-player version of the classic Snake game made using Java AWT tools in Eclipse IDE.</p>
292-
<a href="snakes2/Snakes2.rar" title="Download Source Code"><button class="btn btn-primary"><i class="fa fa-code"></i> Source Code</button></a>
293-
<a href="snakes2/Snakes2.html" title="Play It!" onclick="window.open(this.href,'targetWindow'); return false;"><button class="btn btn-success"><span class="glyphicon glyphicon-play"></span> Play</button></a>
290+
<h3 class="featurette-heading">Java Swing <br /><span class="text-muted">Snakes 2 Game</span><br /><object alt="GitHub Repo stars" data="https://img.shields.io/github/stars/rmodi6/snakes2"></object></h3>
291+
<p class="lead">A 2-player version of the classic Snake game made using Java Swing tools.</p>
292+
<a href="https://github.com/rmodi6/snakes2" title="Source Code" target="_blank"><button class="btn btn-primary"><i class="fa fa-code"></i> Source Code</button></a>
293+
<a href="snakes2" title="Play It!" onclick="window.open(this.href,'targetWindow'); return false;"><button class="btn btn-success"><span class="glyphicon glyphicon-play"></span> Play</button></a>
294294
</div>
295295
<br />
296296
<div class="col-sm-5">

snakes2/Snakes2.html

Lines changed: 0 additions & 24 deletions
This file was deleted.

snakes2/Snakes2.jar

-8.7 KB
Binary file not shown.

snakes2/index.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width,initial-scale=1">
6+
<title>Snakes2</title>
7+
<script src="https://cjrtnc.leaningtech.com/4.2/loader.js"></script>
8+
<style>
9+
html, body {
10+
margin: 0;
11+
}
12+
13+
#container {
14+
width: 100vw;
15+
height: 100svh;
16+
}
17+
</style>
18+
</head>
19+
<body>
20+
<div id="container"></div>
21+
<script type="module">
22+
await cheerpjInit({version: 11});
23+
cheerpjCreateDisplay(-1, -1, document.getElementById("container"));
24+
const dir = location.pathname.substring(0, location.pathname.lastIndexOf("/") + 1);
25+
await cheerpjRunJar(`/app${dir}Snakes2.jar`);
26+
</script>
27+
</body>
28+
</html>

0 commit comments

Comments
 (0)