Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
TimBorowy committed Mar 25, 2019
0 parents commit 213ddfc
Show file tree
Hide file tree
Showing 18 changed files with 5,204 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Arcade client application
23 changes: 23 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
var express = require('express')
var app = express()
const mongo = require('mongodb')
const mongoose = require('mongoose')
const bodyParser = require('body-parser')
const router = require('./routes/MainRouter')(express)
const port = 8080


app.set('view engine', 'hbs')

app.use(bodyParser.json()) // to support JSON-encoded bodies
app.use(bodyParser.urlencoded({ // to support URL-encoded bodies
extended: true
}))

app.use(express.static('public'))
app.use(express.static('games'))

// use routes defined in routes file
app.use('/', router)

app.listen(port, () => console.log(`Arcade server listening on port ${port}!`))
12 changes: 12 additions & 0 deletions controllers/MainController.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@


let controller = {

index: function (req, res) {
res.render('index', {})
},
howToPlay: function (req, res) {
res.render('buttons', {})
}
}
module.exports = controller
18 changes: 18 additions & 0 deletions games/testgame/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
body, html {
margin:0; padding:0;
width:100%; height:100%;
}

* {
box-sizing: border-box;
position: absolute;
}

square{
width: 30px;
height: 30px;
background-color: tomato;
//display: block;
border-radius: 50%;
overflow:hidden;
}
13 changes: 13 additions & 0 deletions games/testgame/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="./css/style.css">
<title>Arcade test game</title>
</head>
<body>
<script src="./js/main.js"></script>
</body>
</html>
99 changes: 99 additions & 0 deletions games/testgame/js/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions games/testgame/js/main.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions games/testgame/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"title": "test game",
"description": "A cool game to test the arcade system",
"howToPlay": "Instructions how to play this game",
"buttons": [
{
"p1-up": "move up"
},
{
"p1-down": "move down"
},
{
"p1-left": "move left"
},
{
"p1-right": "move right"
},
{
"p1-btn-yellow": "change color"
}
]
}
Loading

0 comments on commit 213ddfc

Please sign in to comment.