Skip to content

Commit

Permalink
Merge pull request #2 from 0xabad1deaf/gsw_spark
Browse files Browse the repository at this point in the history
Gsw spark
  • Loading branch information
JoiBlumen committed Nov 17, 2013
2 parents cdf7b00 + cc719bb commit e1dd71f
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bin/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! /bin/bash

mvn -X exec:java -Dexec.mainClass="is.abadidea.tictactoe.App"
mvn package
mvn exec:java -Dexec.mainClass="is.abadidea.tictactoe.App"

7 changes: 6 additions & 1 deletion src/main/java/is/abadidea/tictactoe/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@

public class App
{
private static char[] matrix;

public static void main( String[] args )
{
staticFileLocation("/public");

get(new Route("/") {
@Override
public Object handle(Request request, Response response) {
return "Hello World!";
response.redirect("/index.html");
return "hello";
}
});
}
Expand Down
19 changes: 19 additions & 0 deletions src/main/resources/public/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

.main-game{
margin: 0 auto;
text-align: center;
border: none;
}

.main-game tr{
width: 450px;
height: 150px;
}

.main-game tr td{
width: 150px;
height: 150px;
border: solid 2px #333333;
text-align: center;
}

71 changes: 71 additions & 0 deletions src/main/resources/public/game.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">

<!-- Le styles -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css">
<link href="/css/custom.css" rel="stylesheet">
<!-- font awesome -->
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<!-- HTML5 shiv, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://twitter.github.io/bootstrap/assets/js/html5shiv.js"></script>
<![endif]-->

<!-- Fav and touch icons -->
<link rel="shortcut icon" href="/static/favicon.gif">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Tic Tac Toes!</title>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>

<body>
<div class="jumbotron">
<h1> Tic Tac Toes! </h1>
</div>
<div class="container">
<table class="main-game">
<tr>
<td id="box1">
<i class="fa fa-circle-o fa-5x"></i>
</td>
<td id="box2">
<i class="fa fa-check fa-5x"></i>
</td>
<td id="box3">
<i class="fa fa-check fa-5x"></i>
</td>
</tr>
<tr>
<td id="box4">
</td>
<td id="box5">
</td>
<td id="box6">
<i class="fa fa-check fa-5x"></i>
</td>
</tr>
<tr>
<td id="box7">
<i class="fa fa-circle-o fa-5x"></i>
</td>
<td id="box8">
</td>
<td id="box9">
</td>
</tr>
</table>
</div>

</body>
</html>

<script>
$( ".main-game tr td" ).click(function() {
alert( "Handler for .click() called for " + this.id );
});
</script>
37 changes: 37 additions & 0 deletions src/main/resources/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">

<!-- Le styles -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css">
<link href="css/custom.css" rel="stylesheet">
<!-- font awesome -->
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<!-- HTML5 shiv, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://twitter.github.io/bootstrap/assets/js/html5shiv.js"></script>
<![endif]-->

<!-- Fav and touch icons -->
<link rel="shortcut icon" href="/static/favicon.gif">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Tic Tac Toes!</title>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>

<body>
<div class="jumbotron">
<h1> Tic Tac Toes! </h1>
</div>
<div class="container">
<a href="game.html"><button type="button" class="btn btn-primary btn-lg btn-block">Play vs. Computer Player</button></a>
<button type="button" class="btn btn-default btn-lg btn-block">Play vs. Human Player</button>
</div>

</body>
</html>

0 comments on commit e1dd71f

Please sign in to comment.