Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ae8794f564 | |||
| 2f3062bf33 | |||
| 0e86f7d4aa | |||
| 8851a6d68b | |||
| 94ebe9a428 | |||
| 4a94855be9 | |||
| a8ac13850b | |||
| fe5378f69b | |||
| e8691f29bb | |||
| fcd490ef4e | |||
| a3465f6cf9 | |||
| a91172ef7a |
@@ -1,20 +0,0 @@
|
|||||||
# This file is a "template" of which env vars need to be defined for your application
|
|
||||||
# Copy this file to .env file for development, create environment variables when deploying to production
|
|
||||||
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
|
|
||||||
|
|
||||||
###> symfony/framework-bundle ###
|
|
||||||
APP_ENV=dev
|
|
||||||
APP_SECRET=c1c278747d952ea66326352b72bb8ec6
|
|
||||||
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
|
|
||||||
#TRUSTED_HOSTS=localhost,example.com
|
|
||||||
###< symfony/framework-bundle ###
|
|
||||||
|
|
||||||
###> doctrine/doctrine-bundle ###
|
|
||||||
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
|
|
||||||
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
|
|
||||||
# Configure your db driver and server_version in config/packages/doctrine.yaml
|
|
||||||
DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name
|
|
||||||
###< doctrine/doctrine-bundle ###
|
|
||||||
###> symfony/mailer ###
|
|
||||||
# MAILER_DSN=smtp://localhost
|
|
||||||
###< symfony/mailer ###
|
|
||||||
+35
-16
@@ -1,20 +1,39 @@
|
|||||||
###> system7 - jotunheimr ###
|
/app/config/parameters.yml
|
||||||
+bak/
|
/build/
|
||||||
.idea/
|
/phpunit.xml
|
||||||
node_modules/
|
/var/*
|
||||||
nohup.out
|
!/var/cache
|
||||||
###< system7 - jotunheimr ###
|
/var/cache/*
|
||||||
|
!var/cache/.gitkeep
|
||||||
###> symfony/framework-bundle ###
|
!/var/logs
|
||||||
/.env
|
/var/logs/*
|
||||||
/public/bundles/
|
!var/logs/.gitkeep
|
||||||
/var/
|
!/var/sessions
|
||||||
|
/var/sessions/*
|
||||||
|
!var/sessions/.gitkeep
|
||||||
|
!var/SymfonyRequirements.php
|
||||||
/vendor/
|
/vendor/
|
||||||
###< symfony/framework-bundle ###
|
/web/bundles/
|
||||||
|
|
||||||
###> symfony/webpack-encore-bundle ###
|
# s7 mods
|
||||||
|
/!/
|
||||||
|
/.idea/
|
||||||
|
/.idea/*
|
||||||
|
/.idea/workspace.xml
|
||||||
|
/.idea/dataSources.ids
|
||||||
|
/.idea/dataSources.xml
|
||||||
|
/.idea/dataSources.local.xml
|
||||||
|
|
||||||
|
web/css/*
|
||||||
|
web/js/*
|
||||||
|
web/uploads/*
|
||||||
|
|
||||||
|
phpunit.phar
|
||||||
|
phpunit-report/*
|
||||||
/node_modules/
|
/node_modules/
|
||||||
/public/build/
|
/src/Mine/SeekerBundle/Resources/public/js/node/
|
||||||
|
/src/Mine/SeekerBundle/Resources/public/js/src/
|
||||||
|
|
||||||
|
nohup.out
|
||||||
|
src/Mine/SeekerBundle/Resources/public/js/build/
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
yarn-error.log
|
|
||||||
###< symfony/webpack-encore-bundle ###
|
|
||||||
|
|||||||
-105
@@ -1,105 +0,0 @@
|
|||||||
Changelog
|
|
||||||
=========
|
|
||||||
|
|
||||||
|
|
||||||
0.4.0 (2019-10-26)
|
|
||||||
------------------
|
|
||||||
- Change session driver to REDIS. [Lang]
|
|
||||||
- Add created, updated field to db && improve graph design. [Lang]
|
|
||||||
- Cache setup && optimalize for google pagespeed && optimalize all
|
|
||||||
images. [Lang]
|
|
||||||
- Improve graph design on homepage && add footer and techs && add
|
|
||||||
official pages. [Lang]
|
|
||||||
- Bugfix mine websocket periodic mysql calling. [Lang]
|
|
||||||
- Bugfix hwioauth remember me && centralize hwioauth and facebook
|
|
||||||
settings. [Lang]
|
|
||||||
- Centralize jquery && bugfix mysql auto-termination problem w/ user
|
|
||||||
auth. [Lang]
|
|
||||||
- Release beta4. [Lang]
|
|
||||||
- Gitignore npm debug log. [Lang]
|
|
||||||
- Add english lang everywhere && add snowfall && add centralized version
|
|
||||||
nbr && improve stylesheet && slack integration. [Lang]
|
|
||||||
- Bugfix #30 && random bg in game. [Lang]
|
|
||||||
- Add google analytics and facebook scripts && improve url share method
|
|
||||||
w/ fb && enforce https in prod. [Lang]
|
|
||||||
- Reg and login buttons on index && remove list method && facebook
|
|
||||||
centralize. [Lang]
|
|
||||||
- Redesign user frontend. [Lang]
|
|
||||||
- Mods for performance; one js.min file on prod. [Lang]
|
|
||||||
- Improve webpack config for prod compile #23. [Lang]
|
|
||||||
- Ssl handling #22 && reconnection issues #20, #21. [Lang]
|
|
||||||
- Facebook prod settings w/ app; hwi/HWIOAuthBundle. [Lang]
|
|
||||||
- Refact && game reconnection and restore w/o refresh #3 && bugfix bomb
|
|
||||||
explosion on opponent mines #19. [Lang]
|
|
||||||
- Typo in rpc. [Lang]
|
|
||||||
- Handle prod mysql timeout && graphics improve. [Lang]
|
|
||||||
- Gitignore webpacked index.js. [Lang]
|
|
||||||
- Add production mods. [Lang]
|
|
||||||
- Bugfix points saving and exploded bombs to db && you can resign #6.
|
|
||||||
[Lang]
|
|
||||||
- Bugfix resign button existence #11. [Lang]
|
|
||||||
- Bugfix opponent bomb btn buzz on hover #10. [Lang]
|
|
||||||
- Bugfix points problem in the end #16. [Lang]
|
|
||||||
- Add desc to every user #9. [Lang]
|
|
||||||
- Clipboard - not working #8. [Lang]
|
|
||||||
- Random player on start #5. [Lang]
|
|
||||||
- Show left mines after end #2 && reduce network traffic && better
|
|
||||||
active field checking method. [Lang]
|
|
||||||
- Some refactor #13. [Lang]
|
|
||||||
- Bugfix grid field render #12. [Lang]
|
|
||||||
- Game ends after x mines. [Lang]
|
|
||||||
- Add new sounds && refactor && new bg images && form redesigns. [Lang]
|
|
||||||
- Bugfix entities gridrow, grid && improve graph design on homepage.
|
|
||||||
[Lang]
|
|
||||||
- Some refactor && prod settings. [Lang]
|
|
||||||
- Improve graphics design in game. [Lang]
|
|
||||||
- Bugfix grid row in entity. [Lang]
|
|
||||||
- Bugfix changePlayer after bomb explosion. [Lang]
|
|
||||||
- Improve game graph design. [Lang]
|
|
||||||
- Login and register form more design. [Lang]
|
|
||||||
- Add basic design to userbundle && refactor. [Lang]
|
|
||||||
- Add font-awesome. [Lang]
|
|
||||||
- Working user authentication w/ fb and plain login. [Lang]
|
|
||||||
- Add facebook login module, hwi/HWIOAuthBundle. [Lang]
|
|
||||||
- Login && register form overrided. [Lang]
|
|
||||||
- Js and config refactor. [Lang]
|
|
||||||
- Replace gridcol object to json array in db. [Lang]
|
|
||||||
- Refactor. [Lang]
|
|
||||||
- Save steps and point info to db. [Lang]
|
|
||||||
- Save the step data to db. [Lang]
|
|
||||||
- Renamed the acme to mineseeker && handle when the user connection has
|
|
||||||
been lost. [Lang]
|
|
||||||
- Add player names to UI. [Lang]
|
|
||||||
- Add overlay && game do not start until the opponent came. [Lang]
|
|
||||||
- Add base64 encryption to grid when it has been sended to server.
|
|
||||||
[Lang]
|
|
||||||
- On click opponents bomb, you cannot target && refactor. [Lang]
|
|
||||||
- Warning when player has been found more than 20 mines. [Lang]
|
|
||||||
- Bugfix center mine counter animation. [Lang]
|
|
||||||
- The opponent is the next when bomb is exploded. [Lang]
|
|
||||||
- Current username checked && refactor && remove players in channel when
|
|
||||||
they are more than 2. [Lang]
|
|
||||||
- Send bomb info and use it on opponent. [Lang]
|
|
||||||
- Add sounds w/ howler. [Lang]
|
|
||||||
- Bugfix multiple empty fields w/ one click on opponent view. [Lang]
|
|
||||||
- Refact && remove sound and logging && bugfix BIGBUG - handleGridField
|
|
||||||
and showAppropriateFields sort order... [Lang]
|
|
||||||
- Create first working communication. [Lang]
|
|
||||||
- Create entities and repositories. [Lang]
|
|
||||||
- Changed websocket default port && debug RPC. [Lang]
|
|
||||||
- Created working session and client handler w/ websocket. [Lang]
|
|
||||||
- Working websocket client and server w/o session handling and storage.
|
|
||||||
[Lang]
|
|
||||||
- Composer update. [Lang]
|
|
||||||
- Improve game && start sound creating. [Lang]
|
|
||||||
- Refactor grid control and grid field. [Lang]
|
|
||||||
- Created basic game w/ table and animations. [Lang]
|
|
||||||
- Websocket basic setup FE & BE && working basic game w/ react &&
|
|
||||||
webpack & babel config. [Lang]
|
|
||||||
- Gitignore node_modules && add symlink to node_modules (just for
|
|
||||||
install) && basic react. [Lang]
|
|
||||||
- Add react hello world. [Lang]
|
|
||||||
- Rename project in config. [Lang]
|
|
||||||
- Initial commit && create project in symfony3. [Lang]
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,40 +1,40 @@
|
|||||||
mineseeker
|
|
||||||
=========
|
|
||||||
|
|
||||||
A Symfony project created on September 22, 2016, 13:56 pm.
|
|
||||||
|
|
||||||
PROJECT VERSION 1.1.0-20191026
|
|
||||||
|
|
||||||
This is a Symfony 3 project w/ React JS in standalone mode and w/ WebSocket.
|
This is a Symfony 3 project w/ React JS in standalone mode and w/ WebSocket.
|
||||||
|
|
||||||
#### Must installed modules w/ npm are in package.json + to global:
|
0.) Must installed modules w/ npm are in package.json + to global:
|
||||||
|
|
||||||
$ npm install webpack -g
|
$ npm install webpack -g
|
||||||
|
|
||||||
You will need a
|
You will need a
|
||||||
.babelrc file w/ the presets
|
.babelrc file w/ the presets
|
||||||
webpack.config.js - https://webpack.github.io/docs/webpack-for-browserify-users.html
|
webpack.config.js - https://webpack.github.io/docs/webpack-for-browserify-users.html
|
||||||
same as dir where the package.json!!
|
same as dir where the package.json!!
|
||||||
|
|
||||||
__(!) Tutorial: https://egghead.io/lessons/react-introduction-to-properties__
|
(!) Tutorial: https://egghead.io/lessons/react-introduction-to-properties
|
||||||
|
|
||||||
#### Backend WebSocket server start as daemon - GeniusesOfSymfony/WebSocketBundle
|
|
||||||
|
|
||||||
$ nohup bin/console gos:websocket:server &
|
|
||||||
|
|
||||||
#### React JS WebPack watch generator w/ babel presets: es2015, react
|
1.) Backend WebSocket server start as daemon - GeniusesOfSymfony/WebSocketBundle
|
||||||
|
|
||||||
$ webpack -p --config=webpack-prod.config.js
|
$ nohup php bin/console gos:websocket:server --env=prod &
|
||||||
|
|
||||||
PROD
|
2.) React JS WebPack watch generator w/ babel presets: es2015, react
|
||||||
|
|
||||||
$ webpack --progress --colors --watch -d
|
$ webpack -p --config=webpack-prod.config.js
|
||||||
|
|
||||||
DEV
|
PROD
|
||||||
|
|
||||||
-d --> Debugger; If you write this line somewhere: debugger;
|
$ webpack --progress --colors --watch -d
|
||||||
The browser will stop the code here!!!
|
|
||||||
|
|
||||||
#### Connect to Prod
|
DEV
|
||||||
|
|
||||||
|
-d --> Debugger; If you write this line somewhere: debugger;
|
||||||
|
The browser will stop the code here!!!
|
||||||
|
|
||||||
|
3.) Connect to Prod
|
||||||
|
|
||||||
|
$ ssh xxsvci@laszlolang.com -i ~/.ssh/id_rsa_laszlolang
|
||||||
|
|
||||||
|
4.) Stunnel config
|
||||||
|
|
||||||
|
$ sudo nano /etc/stunnel/stunnel.conf
|
||||||
|
|
||||||
ssh xxsvci@laszlolang.com -i ~/.ssh/id_rsa_laszlolang
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<IfModule mod_authz_core.c>
|
||||||
|
Require all denied
|
||||||
|
</IfModule>
|
||||||
|
<IfModule !mod_authz_core.c>
|
||||||
|
Order deny,allow
|
||||||
|
Deny from all
|
||||||
|
</IfModule>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
|
||||||
|
|
||||||
|
class AppCache extends HttpCache
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Symfony\Component\HttpKernel\Kernel;
|
||||||
|
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||||
|
|
||||||
|
class AppKernel extends Kernel
|
||||||
|
{
|
||||||
|
public function registerBundles()
|
||||||
|
{
|
||||||
|
$bundles = [
|
||||||
|
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||||
|
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
|
||||||
|
new Symfony\Bundle\TwigBundle\TwigBundle(),
|
||||||
|
new Symfony\Bundle\MonologBundle\MonologBundle(),
|
||||||
|
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
|
||||||
|
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
||||||
|
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
|
||||||
|
|
||||||
|
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
|
||||||
|
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
|
||||||
|
new FOS\UserBundle\FOSUserBundle(),
|
||||||
|
new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
|
||||||
|
new Gos\Bundle\WebSocketBundle\GosWebSocketBundle(),
|
||||||
|
new Gos\Bundle\PubSubRouterBundle\GosPubSubRouterBundle(),
|
||||||
|
new Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(),
|
||||||
|
new Snc\RedisBundle\SncRedisBundle(),
|
||||||
|
// new CL\Bundle\SlackBundle\CLSlackBundle(),
|
||||||
|
|
||||||
|
new Jotunheimr\AdminBundle\JotunheimrAdminBundle(),
|
||||||
|
new Jotunheimr\UserBundle\JotunheimrUserBundle(),
|
||||||
|
new Mine\SeekerBundle\MineSeekerBundle(),
|
||||||
|
];
|
||||||
|
|
||||||
|
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
|
||||||
|
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
|
||||||
|
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
|
||||||
|
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
|
||||||
|
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $bundles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRootDir()
|
||||||
|
{
|
||||||
|
return __DIR__;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCacheDir()
|
||||||
|
{
|
||||||
|
return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLogDir()
|
||||||
|
{
|
||||||
|
return dirname(__DIR__).'/var/logs';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function registerContainerConfiguration(LoaderInterface $loader)
|
||||||
|
{
|
||||||
|
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,28 +14,38 @@
|
|||||||
<meta name="country" content="Hungary">
|
<meta name="country" content="Hungary">
|
||||||
<meta name="description" content="This is a new minesweeper, multiplayer game.">
|
<meta name="description" content="This is a new minesweeper, multiplayer game.">
|
||||||
<meta name="content-language" content="hu,hun,hungarian">
|
<meta name="content-language" content="hu,hun,hungarian">
|
||||||
|
{% include '@MineSeeker/Recent/favicon.html.twig' %}
|
||||||
<meta property="fb:app_id" content="{{ facebook_api }}">
|
<meta property="fb:app_id" content="{{ facebook_api }}">
|
||||||
{% block metas %}{% endblock %}
|
{% block metas %}{% endblock %}
|
||||||
<title>MineSeeker{% block title %}{% endblock %}</title>
|
<title>MineSeeker{% block title %}{% endblock %}</title>
|
||||||
|
|
||||||
{% block stylesheets %}{% endblock %}
|
{% block stylesheets %}{% endblock %}
|
||||||
|
{% include '@MineSeeker/Recent/google-analytics.html.twig' %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<img src="{{ asset('/images/beta-logo-png-2.png') }}" alt="Beta version" class="mine-beta">
|
<div id="fb-root"></div>
|
||||||
|
|
||||||
{% block bodyTop %}{% endblock %}
|
{% block bodyTop %}{% endblock %}
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
{% block header %}{% endblock %}
|
{% block header %}{% endblock %}
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
{% block body %}{% endblock %}
|
{% block body %}{% endblock %}
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
{% block footer %}{% endblock %}
|
{% block footer %}{% endblock %}
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
{% block javascripts %}{% endblock %}
|
{% block javascripts %}
|
||||||
|
{% javascripts filter='?uglifyjs2'
|
||||||
|
'@JotunheimrAdminBundle/Resources/public/js/vendor/plugins/jQuery/jquery-3.0.0.min.js'
|
||||||
|
'@JotunheimrAdminBundle/Resources/public/js/vendor/plugins/jQuery/jquery-migrate-3.0.0.min.js'
|
||||||
|
'@JotunheimrAdminBundle/Resources/public/js/vendor/bootstrap/js/bootstrap.min.js' %}
|
||||||
|
<script type="text/javascript" src="{{ asset_url }}"></script>
|
||||||
|
{% endjavascripts %}
|
||||||
|
|
||||||
|
{% include '@MineSeeker/Recent/facebook.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Doctrine\Common\Annotations\AnnotationRegistry;
|
||||||
|
use Composer\Autoload\ClassLoader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var ClassLoader $loader
|
||||||
|
*/
|
||||||
|
$loader = require __DIR__.'/../vendor/autoload.php';
|
||||||
|
|
||||||
|
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
|
||||||
|
|
||||||
|
return $loader;
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
imports:
|
||||||
|
- { resource: security.yml }
|
||||||
|
- { resource: services.yml }
|
||||||
|
- { resource: "@JotunheimrAdminBundle/Resources/config/config.yml" }
|
||||||
|
- { resource: "@JotunheimrUserBundle/Resources/config/config.yml" }
|
||||||
|
- { resource: "@MineSeekerBundle/Resources/config/config.yml" }
|
||||||
|
- { resource: "@MineSeekerBundle/Resources/config/services.yml" }
|
||||||
|
|
||||||
|
# Put parameters here that don't need to change on each machine where the app is deployed
|
||||||
|
# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
|
||||||
|
parameters:
|
||||||
|
locale: en
|
||||||
|
fos.email: 7system7@gmail.com
|
||||||
|
fos.name: system7
|
||||||
|
|
||||||
|
framework:
|
||||||
|
#esi: ~
|
||||||
|
translator: { fallbacks: ["%locale%"] }
|
||||||
|
secret: "%secret%"
|
||||||
|
router:
|
||||||
|
resource: "%kernel.root_dir%/config/routing.yml"
|
||||||
|
strict_requirements: ~
|
||||||
|
form: ~
|
||||||
|
csrf_protection: ~
|
||||||
|
validation: { enable_annotations: true }
|
||||||
|
#serializer: { enable_annotations: true }
|
||||||
|
templating:
|
||||||
|
engines: ['twig']
|
||||||
|
default_locale: "%locale%"
|
||||||
|
trusted_hosts: ~
|
||||||
|
trusted_proxies: ~
|
||||||
|
session:
|
||||||
|
# http://symfony.com/doc/current/reference/configuration/framework.html#handler-id
|
||||||
|
# handler_id: session.handler.native_file
|
||||||
|
# save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%"
|
||||||
|
handler_id: session.handler.pdo
|
||||||
|
fragments: ~
|
||||||
|
http_method_override: true
|
||||||
|
assets: ~
|
||||||
|
|
||||||
|
# Twig Configuration
|
||||||
|
twig:
|
||||||
|
debug: "%kernel.debug%"
|
||||||
|
strict_variables: "%kernel.debug%"
|
||||||
|
globals:
|
||||||
|
version: "0.42.21 (beta8)"
|
||||||
|
facebook_api: "%facebook.api%"
|
||||||
|
facebook_scope: "%facebook.scope%"
|
||||||
|
facebook_api_version: "%facebook.version%"
|
||||||
|
|
||||||
|
# Doctrine Configuration
|
||||||
|
doctrine:
|
||||||
|
dbal:
|
||||||
|
driver: pdo_mysql
|
||||||
|
host: "%database_host%"
|
||||||
|
port: "%database_port%"
|
||||||
|
dbname: "%database_name%"
|
||||||
|
user: "%database_user%"
|
||||||
|
password: "%database_password%"
|
||||||
|
charset: UTF8
|
||||||
|
# if using pdo_sqlite as your database driver:
|
||||||
|
# 1. add the path in parameters.yml
|
||||||
|
# e.g. database_path: "%kernel.root_dir%/data/data.db3"
|
||||||
|
# 2. Uncomment database_path in parameters.yml.dist
|
||||||
|
# 3. Uncomment next line:
|
||||||
|
# path: "%database_path%"
|
||||||
|
|
||||||
|
orm:
|
||||||
|
auto_generate_proxy_classes: "%kernel.debug%"
|
||||||
|
naming_strategy: doctrine.orm.naming_strategy.underscore
|
||||||
|
auto_mapping: true
|
||||||
|
|
||||||
|
# Assetic Configuration
|
||||||
|
assetic:
|
||||||
|
debug: "%kernel.debug%"
|
||||||
|
use_controller: "%kernel.debug%"
|
||||||
|
bundles: ~
|
||||||
|
node: /usr/bin/nodejs
|
||||||
|
filters:
|
||||||
|
cssrewrite: ~
|
||||||
|
uglifyjs2:
|
||||||
|
bin: "%kernel.root_dir%/../node_modules/uglify-js/bin/uglifyjs"
|
||||||
|
no_copyright: true
|
||||||
|
uglifycss:
|
||||||
|
bin: "%kernel.root_dir%/../node_modules/uglifycss/uglifycss"
|
||||||
|
|
||||||
|
# FOS User Configuration
|
||||||
|
fos_user:
|
||||||
|
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
|
||||||
|
firewall_name: secured_area
|
||||||
|
user_class: Jotunheimr\UserBundle\Entity\User
|
||||||
|
from_email:
|
||||||
|
address: "%fos.email%"
|
||||||
|
sender_name: "%fos.name%"
|
||||||
|
|
||||||
|
# Facebook OAuth
|
||||||
|
hwi_oauth:
|
||||||
|
firewall_names: [secured_area]
|
||||||
|
resource_owners:
|
||||||
|
facebook:
|
||||||
|
type: facebook
|
||||||
|
client_id: "%facebook.api%"
|
||||||
|
client_secret: "%facebook.api-secret%"
|
||||||
|
scope: "%facebook.scope%"
|
||||||
|
options:
|
||||||
|
display: popup
|
||||||
|
auth_type: rerequest
|
||||||
|
csrf: true
|
||||||
|
|
||||||
|
# Slack integration
|
||||||
|
#cl_slack:
|
||||||
|
# api_token: xoxp-107639806167-107029084564-115427085733-cccaa4f96c89c87ce680c7f22acfd001
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
imports:
|
||||||
|
- { resource: parameters_dev.yml }
|
||||||
|
- { resource: config.yml }
|
||||||
|
|
||||||
|
framework:
|
||||||
|
router:
|
||||||
|
resource: "%kernel.root_dir%/config/routing_dev.yml"
|
||||||
|
strict_requirements: true
|
||||||
|
profiler: { only_exceptions: false }
|
||||||
|
|
||||||
|
web_profiler:
|
||||||
|
toolbar: true
|
||||||
|
intercept_redirects: false
|
||||||
|
|
||||||
|
|
||||||
|
# Swiftmailer Configuration
|
||||||
|
swiftmailer:
|
||||||
|
transport: "%mailer_transport%"
|
||||||
|
host: "%mailer_host%"
|
||||||
|
username: "%mailer_user%"
|
||||||
|
password: "%mailer_password%"
|
||||||
|
spool: { type: memory }
|
||||||
|
|
||||||
|
monolog:
|
||||||
|
handlers:
|
||||||
|
main:
|
||||||
|
type: stream
|
||||||
|
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||||
|
level: debug
|
||||||
|
channels: [!event]
|
||||||
|
console:
|
||||||
|
type: console
|
||||||
|
channels: [!event, !doctrine]
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
facebook.api: 320599508311862
|
||||||
|
facebook.api-secret: 18d4f48cdd274bccee2678e5eff3f557
|
||||||
|
facebook.version: 'v2.8'
|
||||||
|
facebook.scope: 'public_profile,email,user_friends'
|
||||||
|
mineseeker.websocket: 6450
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
imports:
|
||||||
|
- { resource: parameters_prod.yml }
|
||||||
|
- { resource: config.yml }
|
||||||
|
|
||||||
|
# Swiftmailer Configuration
|
||||||
|
swiftmailer:
|
||||||
|
transport: "%mailer_transport%"
|
||||||
|
host: "%mailer_host%"
|
||||||
|
username: "%mailer_user%"
|
||||||
|
password: "%mailer_password%"
|
||||||
|
spool: { type: memory }
|
||||||
|
|
||||||
|
monolog:
|
||||||
|
handlers:
|
||||||
|
main:
|
||||||
|
type: fingers_crossed
|
||||||
|
action_level: error
|
||||||
|
handler: nested
|
||||||
|
nested:
|
||||||
|
type: stream
|
||||||
|
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||||
|
level: debug
|
||||||
|
console:
|
||||||
|
type: console
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
facebook.api: 320597498312063
|
||||||
|
facebook.api-secret: c751bec8a3c5313ff2e5a83769bf1109
|
||||||
|
facebook.version: 'v2.8'
|
||||||
|
facebook.scope: 'public_profile,email,user_friends'
|
||||||
|
mineseeker.websocket: 8080
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
imports:
|
||||||
|
- { resource: config_dev.yml }
|
||||||
|
|
||||||
|
framework:
|
||||||
|
test: ~
|
||||||
|
session:
|
||||||
|
storage_id: session.storage.mock_file
|
||||||
|
profiler:
|
||||||
|
collect: false
|
||||||
|
|
||||||
|
web_profiler:
|
||||||
|
toolbar: false
|
||||||
|
intercept_redirects: false
|
||||||
|
|
||||||
|
swiftmailer:
|
||||||
|
disable_delivery: true
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# This file is a "template" of what your parameters.yml file should look like
|
||||||
|
# Set parameters here that may be different on each deployment target of the app, e.g. development, staging, production.
|
||||||
|
# http://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
|
||||||
|
parameters:
|
||||||
|
database_host: 127.0.0.1
|
||||||
|
database_port: ~
|
||||||
|
database_name: symfony
|
||||||
|
database_user: root
|
||||||
|
database_password: ~
|
||||||
|
# You should uncomment this if you want use pdo_sqlite
|
||||||
|
# database_path: "%kernel.root_dir%/data.db3"
|
||||||
|
|
||||||
|
mailer_transport: smtp
|
||||||
|
mailer_host: 127.0.0.1
|
||||||
|
mailer_user: ~
|
||||||
|
mailer_password: ~
|
||||||
|
|
||||||
|
# A secret key that's used to generate certain security-related tokens
|
||||||
|
secret: ThisTokenIsNotSoSecretChangeIt
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# This file is auto-generated during the composer install
|
||||||
|
parameters:
|
||||||
|
database_host: 127.0.0.1
|
||||||
|
database_port: null
|
||||||
|
database_name: mine
|
||||||
|
database_user: root
|
||||||
|
database_password: bazmeg
|
||||||
|
mailer_transport: smtp
|
||||||
|
mailer_host: 127.0.0.1
|
||||||
|
mailer_user: null
|
||||||
|
mailer_password: null
|
||||||
|
secret: bbcd5df99fc340558fb3995c198a9b4764db72ba
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# This file is auto-generated during the composer install
|
||||||
|
parameters:
|
||||||
|
database_host: 127.0.0.1
|
||||||
|
database_port: null
|
||||||
|
# database_name: xxsvci_mineseeker
|
||||||
|
# database_user: xxsvci_mine
|
||||||
|
# database_password: "XTw#8qC$faa*"
|
||||||
|
database_name: mine
|
||||||
|
database_user: root
|
||||||
|
database_password: "bazmeg"
|
||||||
|
mailer_transport: smtp
|
||||||
|
mailer_host: 127.0.0.1
|
||||||
|
mailer_user: null
|
||||||
|
mailer_password: null
|
||||||
|
secret: e25d036bb9c7ece0f2049984a1fa2f0cab295aaa
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
fos_user:
|
||||||
|
resource: "@FOSUserBundle/Resources/config/routing/all.xml"
|
||||||
|
|
||||||
|
JotunheimrUserBundle:
|
||||||
|
resource: "@JotunheimrUserBundle/Resources/config/routing.yml"
|
||||||
|
prefix: /
|
||||||
|
|
||||||
|
JotunheimrAdminBundle:
|
||||||
|
resource: "@JotunheimrAdminBundle/Resources/config/routing.yml"
|
||||||
|
prefix: /
|
||||||
|
|
||||||
|
MineSeekerBundle:
|
||||||
|
resource: "@MineSeekerBundle/Resources/config/routing.yml"
|
||||||
|
prefix: /
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
_wdt:
|
||||||
|
resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
|
||||||
|
prefix: /_wdt
|
||||||
|
|
||||||
|
_profiler:
|
||||||
|
resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
|
||||||
|
prefix: /_profiler
|
||||||
|
|
||||||
|
_errors:
|
||||||
|
resource: "@TwigBundle/Resources/config/routing/errors.xml"
|
||||||
|
prefix: /_error
|
||||||
|
|
||||||
|
_main:
|
||||||
|
resource: routing.yml
|
||||||
|
schemes: [http]
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
security:
|
||||||
|
encoders:
|
||||||
|
FOS\UserBundle\Model\UserInterface: bcrypt
|
||||||
|
|
||||||
|
role_hierarchy:
|
||||||
|
ROLE_ADMIN: ROLE_USER
|
||||||
|
ROLE_SUPER_ADMIN: ROLE_ADMIN
|
||||||
|
|
||||||
|
providers:
|
||||||
|
fos_userbundle:
|
||||||
|
id: fos_user.user_provider.username_email
|
||||||
|
|
||||||
|
firewalls:
|
||||||
|
secured_area:
|
||||||
|
anonymous: ~
|
||||||
|
oauth:
|
||||||
|
resource_owners:
|
||||||
|
facebook: /login/check-facebook
|
||||||
|
google: /login/check-google
|
||||||
|
my_github: /login/check-github
|
||||||
|
login_path: /login
|
||||||
|
failure_path: /login
|
||||||
|
use_forward: false
|
||||||
|
oauth_user_provider:
|
||||||
|
service: jotun.user_provider
|
||||||
|
remember_me:
|
||||||
|
secret: "%secret%"
|
||||||
|
lifetime: 604800
|
||||||
|
path: /
|
||||||
|
domain: ~
|
||||||
|
user_provider: fos_userbundle
|
||||||
|
form_login:
|
||||||
|
provider: fos_userbundle
|
||||||
|
csrf_token_generator: security.csrf.token_manager
|
||||||
|
default_target_path: /
|
||||||
|
remember_me: true
|
||||||
|
logout:
|
||||||
|
path: /logout
|
||||||
|
target: /
|
||||||
|
|
||||||
|
access_control:
|
||||||
|
- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||||
|
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||||
|
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||||
|
- { path: ^/play, role: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||||
|
- { path: ^/admin, role: ROLE_SUPER_ADMIN }
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Learn more about services, parameters and containers at
|
||||||
|
# http://symfony.com/doc/current/book/service_container.html
|
||||||
|
parameters:
|
||||||
|
# parameter_name: value
|
||||||
|
|
||||||
|
services:
|
||||||
|
# service_name:
|
||||||
|
# class: AppBundle\Directory\ClassName
|
||||||
|
# arguments: ["@another_service_name", "plain_value", "%parameter_name%"]
|
||||||
@@ -1,181 +0,0 @@
|
|||||||
* {
|
|
||||||
outline: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
html, body {
|
|
||||||
background: #ffffff;
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
header {
|
|
||||||
background: #d1e8ff;
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
height: 950px;
|
|
||||||
color: #ffffff;
|
|
||||||
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
justify-content: flex-start;
|
|
||||||
flex-direction: column;
|
|
||||||
max-width: 1300px;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.logo img {
|
|
||||||
width: 350px;
|
|
||||||
margin: 50px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.logo a {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section > img {
|
|
||||||
position: absolute;
|
|
||||||
width: 1300px;
|
|
||||||
height: 1300px;
|
|
||||||
right: -20%;
|
|
||||||
top: -10%;
|
|
||||||
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section > div {
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section h1 {
|
|
||||||
font: bold 40px 'Rajdhani', sans-serif;
|
|
||||||
color: #434242;
|
|
||||||
margin-bottom: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section h2 {
|
|
||||||
font: normal 32px 'Rajdhani', sans-serif;
|
|
||||||
color: #434242;
|
|
||||||
margin-top: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section h3 {
|
|
||||||
display: block;
|
|
||||||
font: bold 16px 'Rajdhani', sans-serif;
|
|
||||||
color: #434242;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section h3 img {
|
|
||||||
width: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a {
|
|
||||||
background: #69788e;
|
|
||||||
display: table;
|
|
||||||
font: bold 32px 'Rajdhani', sans-serif;
|
|
||||||
text-transform: uppercase;
|
|
||||||
text-decoration: none;
|
|
||||||
border: 5px solid #57667b;
|
|
||||||
color: #FFFFFF;
|
|
||||||
padding: 25px 150px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
|
|
||||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
|
||||||
border-radius: 20px;
|
|
||||||
transition: all 250ms ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a:hover {
|
|
||||||
background: #57667b;
|
|
||||||
|
|
||||||
-webkit-box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2);
|
|
||||||
box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2);
|
|
||||||
-webkit-transition: all 250ms ease-in-out;
|
|
||||||
-moz-transition: all 250ms ease-in-out;
|
|
||||||
-o-transition: all 250ms ease-in-out;
|
|
||||||
transition: all 250ms ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a.small {
|
|
||||||
background: #83aed9;
|
|
||||||
display: inline-block;
|
|
||||||
font: bold 22px 'Rajdhani', sans-serif;
|
|
||||||
border: 1px solid #6890ba;
|
|
||||||
color: #FFFFFF;
|
|
||||||
padding: 10px;
|
|
||||||
|
|
||||||
-webkit-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
|
||||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
|
||||||
-webkit-transition: all 250ms ease-in-out;
|
|
||||||
-moz-transition: all 250ms ease-in-out;
|
|
||||||
-o-transition: all 250ms ease-in-out;
|
|
||||||
transition: all 250ms ease-in-out;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a.small:hover {
|
|
||||||
background: #86b5e1;
|
|
||||||
border: 1px solid #658fb8;
|
|
||||||
color: #FFFFFF;
|
|
||||||
|
|
||||||
-webkit-box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2);
|
|
||||||
box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2);
|
|
||||||
-webkit-transition: all 250ms ease-in-out;
|
|
||||||
-moz-transition: all 250ms ease-in-out;
|
|
||||||
-o-transition: all 250ms ease-in-out;
|
|
||||||
transition: all 250ms ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 1100px) {
|
|
||||||
header section {
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a {
|
|
||||||
margin: 0 auto 20px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section h1 {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.logo img {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section > img {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 500px) {
|
|
||||||
/*header {*/
|
|
||||||
/*min-height: 100%;*/
|
|
||||||
/*height: auto;*/
|
|
||||||
/*}*/
|
|
||||||
|
|
||||||
header section {
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.logo img {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a {
|
|
||||||
display: block;
|
|
||||||
padding: 25px 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,399 +0,0 @@
|
|||||||
@import url('https://fonts.googleapis.com/css?family=Rajdhani:300,400,500,600,700&subset=latin-ext');
|
|
||||||
@import "~bootstrap/dist/css/bootstrap.min.css";
|
|
||||||
@import "style";
|
|
||||||
@import "style.homepage";
|
|
||||||
|
|
||||||
::-webkit-input-placeholder {
|
|
||||||
color: #888982;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-moz-placeholder {
|
|
||||||
color: #888982;
|
|
||||||
}
|
|
||||||
|
|
||||||
:-ms-input-placeholder {
|
|
||||||
color: #888982;
|
|
||||||
}
|
|
||||||
|
|
||||||
:-moz-placeholder {
|
|
||||||
color: #888982;
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
outline: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
*,
|
|
||||||
*:after,
|
|
||||||
*::before {
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ac-custom {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .form-check {
|
|
||||||
display: table;
|
|
||||||
position: relative;
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section h1 {
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .input-submit button,
|
|
||||||
header section .input-submit button:hover,
|
|
||||||
header section .form-input,
|
|
||||||
header section .form-input:focus,
|
|
||||||
header section .form-input:hover {
|
|
||||||
-webkit-transition: all 250ms ease-in-out;
|
|
||||||
-moz-transition: all 250ms ease-in-out;
|
|
||||||
-o-transition: all 250ms ease-in-out;
|
|
||||||
transition: all 250ms ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .input-submit button {
|
|
||||||
background: #83aed9;
|
|
||||||
display: table;
|
|
||||||
font: bold 32px 'Rajdhani', sans-serif;
|
|
||||||
text-transform: uppercase;
|
|
||||||
text-decoration: none;
|
|
||||||
width: 500px;
|
|
||||||
border: 1px solid #658fb8;
|
|
||||||
color: #FFFFFF;
|
|
||||||
padding: 25px 150px;
|
|
||||||
margin-top: 20px;
|
|
||||||
|
|
||||||
-webkit-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
|
||||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
|
||||||
-webkit-border-radius: 3px;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .input-submit button:hover {
|
|
||||||
background: #86b5e1;
|
|
||||||
|
|
||||||
-webkit-box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2);
|
|
||||||
box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .form-input {
|
|
||||||
display: block;
|
|
||||||
width: 500px;
|
|
||||||
font: bold 22px 'Rajdhani', sans-serif;
|
|
||||||
border: 1px solid #dddddd;
|
|
||||||
color: #000000;
|
|
||||||
padding: 15px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
|
|
||||||
-webkit-border-radius: 3px;
|
|
||||||
border-radius: 3px;
|
|
||||||
-webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
|
|
||||||
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .form-input:focus,
|
|
||||||
header section .form-input:hover {
|
|
||||||
-webkit-box-shadow: 0 7px 10px rgba(0, 0, 0, 0.1);
|
|
||||||
box-shadow: 0 7px 10px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .failure {
|
|
||||||
background: #f00;
|
|
||||||
position: relative;
|
|
||||||
border: 3px solid #fff;
|
|
||||||
font: bold 16px 'Rajdhani', sans-serif;
|
|
||||||
color: #FFFFFF;
|
|
||||||
padding: 10px;
|
|
||||||
margin: 30px 0 10px 0;
|
|
||||||
|
|
||||||
-webkit-border-radius: 5px;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .failure:after,
|
|
||||||
header section .failure:before {
|
|
||||||
content: " ";
|
|
||||||
position: absolute;
|
|
||||||
bottom: 100%;
|
|
||||||
left: 50px;
|
|
||||||
height: 0;
|
|
||||||
width: 0;
|
|
||||||
border: solid transparent;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .failure:after {
|
|
||||||
border-color: rgba(0, 0, 0, 0);
|
|
||||||
border-bottom-color: #f00;
|
|
||||||
border-width: 20px;
|
|
||||||
margin-left: -20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .failure:before {
|
|
||||||
border-color: rgba(255, 255, 255, 0);
|
|
||||||
border-bottom-color: #ffffff;
|
|
||||||
border-width: 26px;
|
|
||||||
margin-left: -26px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .failure ul {
|
|
||||||
display: inline-block;
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 10px 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section h3.or {
|
|
||||||
font: bold 16px 'Rajdhani', sans-serif;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: #a1a1a1;
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section #id_welcome {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
margin-bottom: 115px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section #id_welcome > div {
|
|
||||||
padding-right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section #id_welcome img {
|
|
||||||
width: 100px;
|
|
||||||
border: 5px solid #414040;
|
|
||||||
|
|
||||||
-webkit-border-radius: 50%;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .buttons,
|
|
||||||
header section form {
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a.fb-login,
|
|
||||||
header section div.buttons > a.slack-login {
|
|
||||||
position: relative;
|
|
||||||
display: block;
|
|
||||||
width: 500px;
|
|
||||||
height: 93px;
|
|
||||||
padding: 25px 0 25px 150px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
|
|
||||||
overflow: hidden;
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
-webkit-border-radius: 3px;
|
|
||||||
border-radius: 3px;
|
|
||||||
-webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
|
|
||||||
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a.fb-login:hover,
|
|
||||||
header section div.buttons > a.slack-login:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
-webkit-box-shadow: 0 7px 10px rgba(0, 0, 0, 0.1);
|
|
||||||
box-shadow: 0 7px 10px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a.fb-login i,
|
|
||||||
header section div.buttons > a.slack-login i {
|
|
||||||
position: absolute;
|
|
||||||
font-size: 130px;
|
|
||||||
top: 0;
|
|
||||||
left: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a.fb-login {
|
|
||||||
background: #5975b1;
|
|
||||||
border: 1px solid #50649f;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a.fb-login:hover {
|
|
||||||
background: #42598c;
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a.slack-login {
|
|
||||||
background: #FFFFFF;
|
|
||||||
border: 1px solid #5c3a58;
|
|
||||||
color: #5c3a58;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a.slack-login:hover {
|
|
||||||
background: #e6e6e6;
|
|
||||||
color: #5c3a58;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .failure-main {
|
|
||||||
background: #f00;
|
|
||||||
max-width: 500px;
|
|
||||||
border: 3px solid #fff;
|
|
||||||
font: bold 16px 'Rajdhani', sans-serif;
|
|
||||||
color: #FFFFFF;
|
|
||||||
padding: 10px;
|
|
||||||
margin: 0 0 20px 0;
|
|
||||||
|
|
||||||
-webkit-border-radius: 5px;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
main div.txt {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 1000px;
|
|
||||||
font-family: 'Rajdhani', sans-serif;
|
|
||||||
color: #414040;
|
|
||||||
margin: 50px auto 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
main div.txt h2 {
|
|
||||||
margin: 0 0 50px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
main div.txt p {
|
|
||||||
font: normal 16px 'Rajdhani', sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
main div.txt li {
|
|
||||||
font: normal 16px 'Rajdhani', sans-serif;
|
|
||||||
padding-left: 10px;
|
|
||||||
margin-left: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
main .technologies {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
main .technologies img {
|
|
||||||
display: inline-block;
|
|
||||||
width: 90%;
|
|
||||||
max-width: 100px;
|
|
||||||
margin: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
main .technologies h1 {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
background: #414040;
|
|
||||||
width: 100%;
|
|
||||||
min-height: 50px;
|
|
||||||
margin-top: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer nav {
|
|
||||||
display: block;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer nav ul {
|
|
||||||
display: inline-block;
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer nav ul li {
|
|
||||||
display: inline-block;
|
|
||||||
font: bold 16px 'Rajdhani', sans-serif;
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer nav ul li:nth-child(even) {
|
|
||||||
width: 50px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer nav ul li a {
|
|
||||||
text-align: center;
|
|
||||||
line-height: 50px;
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer nav ul li a:hover {
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 1100px) {
|
|
||||||
header section #id_welcome {
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin-top: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .form-input,
|
|
||||||
header section .form-check {
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .input-submit button {
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section > div {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a.fb-login,
|
|
||||||
header section div.buttons > a.slack-login {
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
main div.txt {
|
|
||||||
padding: 0 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 550px) {
|
|
||||||
header section #id_welcome {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section {
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .form-input {
|
|
||||||
width: 100%;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .form-check {
|
|
||||||
margin: 20px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section .input-submit button {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a.fb-login,
|
|
||||||
header section div.buttons > a.slack-login {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
header section div.buttons > a.fb-login span,
|
|
||||||
header section div.buttons > a.slack-login span {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer nav ul li {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer nav ul li:nth-child(even) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
.mine-beta {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
width: 150px;
|
|
||||||
|
|
||||||
z-index: 4;
|
|
||||||
|
|
||||||
transform: rotate(90deg);
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
/*
|
|
||||||
* Welcome to your app's main JavaScript file!
|
|
||||||
*
|
|
||||||
* We recommend including the built version of this JavaScript file
|
|
||||||
* (and its CSS file) in your base layout (base.html.twig).
|
|
||||||
*/
|
|
||||||
|
|
||||||
// any CSS you require will output into a single css file (app.css in this case)
|
|
||||||
require('../css/app.css');
|
|
||||||
|
|
||||||
// Need jQuery? Install it with "yarn add jquery", then uncomment to require it.
|
|
||||||
// const $ = require('jquery');
|
|
||||||
|
|
||||||
console.log('Hello Webpack Encore! Edit me in assets/js/app.js');
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import ReactDOM from 'react-dom';
|
|
||||||
import MineSeeker from './mine-seeker/app';
|
|
||||||
|
|
||||||
ReactDOM.render(
|
|
||||||
<MineSeeker env={document.getElementById('mine-wrapper').dataset.env}
|
|
||||||
gameId={document.getElementById('mine-wrapper').dataset.gameId}
|
|
||||||
ssl={document.getElementById('mine-wrapper').dataset.ssl}/>,
|
|
||||||
document.getElementById('mine-wrapper')
|
|
||||||
);
|
|
||||||
@@ -1,456 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import Grid from './grid/grid';
|
|
||||||
import GridControl from './grid/grid-control';
|
|
||||||
|
|
||||||
class MineSeeker extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
|
|
||||||
let gameAssoc = props.gameId !== '' ? props.gameId : this.makeGameAssoc(50);
|
|
||||||
let channel = "mineseeker/channel/" + gameAssoc;
|
|
||||||
|
|
||||||
this.state = {
|
|
||||||
env: props.env,
|
|
||||||
ssl: props.ssl,
|
|
||||||
gameInherited: props.gameId !== '',
|
|
||||||
gameAssoc: gameAssoc,
|
|
||||||
channel: channel,
|
|
||||||
session: null,
|
|
||||||
createGrid: false,
|
|
||||||
stepCache: [],
|
|
||||||
connectionLost: false,
|
|
||||||
end: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
makeGameAssoc(len) {
|
|
||||||
let text = "";
|
|
||||||
let possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
||||||
for (let i = 0; i < len; i++) {
|
|
||||||
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
|
||||||
}
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
currectGridSize() {
|
|
||||||
let $field = $('#mine-wrapper .grid');
|
|
||||||
$field.height($field.width());
|
|
||||||
|
|
||||||
$field = $('#mine-wrapper .grid .field-wrapper');
|
|
||||||
$field.height($field.width());
|
|
||||||
|
|
||||||
$('#mine-wrapper .grid .field-wrapper .field')
|
|
||||||
.height($field.width())
|
|
||||||
.css('line-height', ($field.width() - 2) + 'px');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* STEP
|
|
||||||
*
|
|
||||||
* @param coords
|
|
||||||
* @returns {{red: *, blue: *}}
|
|
||||||
*/
|
|
||||||
makePointsCalcAndStep(coords) {
|
|
||||||
let users = this.refs.gridControl.refs.userControl,
|
|
||||||
activePlayer = users.state.activePlayer ? 'blue' : 'red',
|
|
||||||
inactivePlayer = users.state.activePlayer ? 'red' : 'blue',
|
|
||||||
redPoints = activePlayer === 'red'
|
|
||||||
? users.refs[activePlayer].state.mines
|
|
||||||
: users.refs[inactivePlayer].state.mines,
|
|
||||||
bluePoints = activePlayer === 'blue'
|
|
||||||
? users.refs[activePlayer].state.mines
|
|
||||||
: users.refs[inactivePlayer].state.mines;
|
|
||||||
|
|
||||||
this.refs.gridControl.stepEvent(coords);
|
|
||||||
|
|
||||||
let mineCache = this.refs.gridControl.state.foundUserMineCache;
|
|
||||||
redPoints += activePlayer === 'red' ? mineCache : 0;
|
|
||||||
bluePoints += activePlayer === 'blue' ? mineCache : 0;
|
|
||||||
|
|
||||||
return {red: redPoints, blue: bluePoints};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* START
|
|
||||||
*
|
|
||||||
* @param payload
|
|
||||||
*/
|
|
||||||
makeGameStart(payload) {
|
|
||||||
/** every time the blue starts */
|
|
||||||
this.refs.gridControl.refs.userControl.setState({activePlayer: 1});
|
|
||||||
|
|
||||||
/** Set up player names w/ server data */
|
|
||||||
this.refs.gridControl.refs.userControl.refs.red.setState({
|
|
||||||
name: payload.users.red !== '' ? payload.users.red : payload.users.redAnon,
|
|
||||||
});
|
|
||||||
|
|
||||||
this.refs.gridControl.refs.userControl.refs.blue.setState({
|
|
||||||
name: payload.users.blue !== '' ? payload.users.blue : payload.users.blueAnon,
|
|
||||||
desc: this.refs.gridControl.state.webPlayer === 'blue'
|
|
||||||
? this.refs.gridControl.state.desc.you
|
|
||||||
: this.refs.gridControl.state.desc.buddy,
|
|
||||||
active: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
this.refs.gridControl.setState({overlay: false});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* THE END
|
|
||||||
*
|
|
||||||
* @param bluePoints
|
|
||||||
* @param redPoints
|
|
||||||
* @param resign
|
|
||||||
*/
|
|
||||||
makeGameEndIfItEnds(bluePoints, redPoints, resign = false) {
|
|
||||||
let redWins = redPoints > 25,
|
|
||||||
blueWins = bluePoints > 25;
|
|
||||||
|
|
||||||
if (redWins || blueWins || resign) {
|
|
||||||
this.refs.gridControl.state.sound.won.play();
|
|
||||||
|
|
||||||
if (false === resign) {
|
|
||||||
this.refs.gridControl.setState({
|
|
||||||
overlay: true,
|
|
||||||
overlayTitle: (redWins ? 'Red' : 'Blue') + " wins the game!",
|
|
||||||
overlaySubTitle: "Play again!"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.refs.gridControl.showLeftMines();
|
|
||||||
|
|
||||||
this.refs.gridControl.refs.userControl.setState({activePlayer: false});
|
|
||||||
this.refs.gridControl.refs.userControl.refs.red.setState({desc: ""});
|
|
||||||
this.refs.gridControl.refs.userControl.refs.blue.setState({desc: ""});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
resignProcess(color) {
|
|
||||||
this.refs.gridControl.setState({
|
|
||||||
overlay: true,
|
|
||||||
overlayTitle: color === this.refs.gridControl.state.webPlayer
|
|
||||||
? "You have been give up"
|
|
||||||
: "Your opponent has been resigned",
|
|
||||||
overlaySubTitle: color === this.refs.gridControl.state.webPlayer
|
|
||||||
? "You LOSE!"
|
|
||||||
: "You WIN!"
|
|
||||||
});
|
|
||||||
|
|
||||||
this.setState({end: true});
|
|
||||||
|
|
||||||
this.makeGameEndIfItEnds(0, 0, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
clickResign() {
|
|
||||||
/** PUBLISH */
|
|
||||||
this.state.session.publish(this.state.channel, {
|
|
||||||
'resign': this.refs.gridControl.refs.userControl.state.activePlayer ? 'blue' : 'red'
|
|
||||||
});
|
|
||||||
this.resignProcess(this.refs.gridControl.state.webPlayer);
|
|
||||||
}
|
|
||||||
|
|
||||||
clickResignCancel() {
|
|
||||||
this.refs.gridControl.setState({
|
|
||||||
overlay: false
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** RESIGN */
|
|
||||||
resign() {
|
|
||||||
let users = this.refs.gridControl.refs.userControl,
|
|
||||||
activePlayer = users.state.activePlayer ? 'blue' : 'red';
|
|
||||||
|
|
||||||
if (this.refs.gridControl.state.webPlayer === activePlayer) {
|
|
||||||
this.refs.gridControl.setState({
|
|
||||||
overlay: true,
|
|
||||||
overlayTitle: "Are u sure u want to resign?!",
|
|
||||||
overlaySubTitle: <div className="resign">
|
|
||||||
<a onClick={this.clickResign.bind(this)}>Yes</a>
|
|
||||||
<a onClick={this.clickResignCancel.bind(this)}>No!</a>
|
|
||||||
</div>
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus
|
|
||||||
* @see https://developers.facebook.com/docs/sharing/reference/send-dialog
|
|
||||||
* @see https://developers.facebook.com/docs/plugins/share-button/
|
|
||||||
*/
|
|
||||||
clickFBShare() {
|
|
||||||
let display = 'popup';
|
|
||||||
|
|
||||||
FB.getLoginStatus(function (response) {
|
|
||||||
display = response.status === 'connected'
|
|
||||||
? 'dialog'
|
|
||||||
: 'popup';
|
|
||||||
});
|
|
||||||
|
|
||||||
FB.ui({
|
|
||||||
method: 'send',
|
|
||||||
display: display,
|
|
||||||
link: window.location.href + '/' + this.state.gameAssoc,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
wInit(session, gridServer, gridClient) {
|
|
||||||
this.setState({session: session});
|
|
||||||
|
|
||||||
/** save session to GridControl */
|
|
||||||
/** render grid fields - @see #12 */
|
|
||||||
this.refs.gridControl.setState({
|
|
||||||
grid: this.state.gameInherited ? gridServer : gridClient,
|
|
||||||
channel: this.state.channel,
|
|
||||||
desc: {
|
|
||||||
buddy: <div>
|
|
||||||
Your buddy is <br/>
|
|
||||||
making a <br/>
|
|
||||||
move.
|
|
||||||
</div>,
|
|
||||||
you: <div>
|
|
||||||
It is your turn! <br/>
|
|
||||||
Make a move.
|
|
||||||
</div>
|
|
||||||
},
|
|
||||||
overlay: true,
|
|
||||||
overlayTitle: "We are waiting for your opponent...",
|
|
||||||
overlaySubTitle: this.state.gameAssoc
|
|
||||||
?
|
|
||||||
<div>
|
|
||||||
<h3>Share this unique link w/ your opponent</h3>
|
|
||||||
<div className="clippy">
|
|
||||||
<input id="foo"
|
|
||||||
defaultValue={window.location.href + '/' + this.state.gameAssoc}/>
|
|
||||||
</div>
|
|
||||||
{this.state.env !== 'dev' &&
|
|
||||||
<a onClick={this.clickFBShare.bind(this)}>Share in Facebook message</a>
|
|
||||||
}
|
|
||||||
{this.state.env === 'dev' &&
|
|
||||||
<a href={"/play/" + this.state.gameAssoc} target="_blank">Play w/ me!</a>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
: '',
|
|
||||||
renderGridFields: this.state.gameAssoc
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
wSubscribe(payload, rpcUsers = null) {
|
|
||||||
this.state.env === 'dev' && console.info(
|
|
||||||
(typeof payload.user !== 'undefined' ? payload.user : 'user') + " has been subscribed to the channel!"
|
|
||||||
);
|
|
||||||
|
|
||||||
let firstUser = !rpcUsers;
|
|
||||||
|
|
||||||
this.refs.gridControl.state.webPlayer === null && this.refs.gridControl.setState({
|
|
||||||
webPlayer: payload.user === payload.users.blue ||
|
|
||||||
(
|
|
||||||
firstUser && payload.users.blueAnon !== '' ||
|
|
||||||
!firstUser && (rpcUsers.blueAnon === '' && rpcUsers.blue === '')
|
|
||||||
)
|
|
||||||
? 'blue' : 'red'
|
|
||||||
});
|
|
||||||
|
|
||||||
/** rwd */
|
|
||||||
(900 > $(document).width()) && this.currectGridSize();
|
|
||||||
|
|
||||||
/** every user has been came */
|
|
||||||
if (
|
|
||||||
payload.userCnt === 2 &&
|
|
||||||
(
|
|
||||||
!this.state.connectionLost ||
|
|
||||||
this.state.connectionLost && false === this.refs.gridControl.refs.userControl.state.activePlayer && !this.state.end
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
this.makeGameStart(payload);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
wUnsubscribe(payload) {
|
|
||||||
this.state.env === 'dev' && console.info(payload.msg);
|
|
||||||
|
|
||||||
this.refs.gridControl.setState({
|
|
||||||
overlay: true,
|
|
||||||
overlayTitle: "The connection has been lost w/ your friend...",
|
|
||||||
overlaySubTitle: "Please, restart the game!"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
wTopic(payload) {
|
|
||||||
/** Auto-Step if this player is not the current user */
|
|
||||||
if (this.refs.gridControl.state.webPlayer !== payload.data.player) {
|
|
||||||
if (null === payload.data.resign) {
|
|
||||||
this.state.env === 'dev' && console.warn(payload.user + " has been stepped to coords: " + payload.data.coords[0] + ', ' + payload.data.coords[1]);
|
|
||||||
this.state.env === 'dev' && console.warn('Opponent stepped: Auto-Step process');
|
|
||||||
|
|
||||||
this.refs.gridControl.refs.userControl.setState({bombSelected: payload.data.bomb});
|
|
||||||
|
|
||||||
/** STEP */
|
|
||||||
let points = this.makePointsCalcAndStep(payload.data.coords);
|
|
||||||
|
|
||||||
/** THE END */
|
|
||||||
this.makeGameEndIfItEnds(points.blue, points.red);
|
|
||||||
} else {
|
|
||||||
/** RESIGN */
|
|
||||||
/** THE END */
|
|
||||||
this.resignProcess(payload.data.resign);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Connect - Subscribe */
|
|
||||||
subscribe(rpcUsers = null) {
|
|
||||||
this.state.session.subscribe(
|
|
||||||
this.state.channel,
|
|
||||||
(uri, payload, log) => {
|
|
||||||
let isTopicEvent = typeof payload.data !== 'undefined',
|
|
||||||
isNotUnsubscribe = typeof payload.msg === 'undefined';
|
|
||||||
|
|
||||||
/** CONNECTION */
|
|
||||||
if (isTopicEvent) {
|
|
||||||
this.wTopic(payload);
|
|
||||||
} else {
|
|
||||||
if (isNotUnsubscribe) {
|
|
||||||
this.wSubscribe(payload, rpcUsers);
|
|
||||||
} else {
|
|
||||||
this.wUnsubscribe(payload);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** RECONNECTION */
|
|
||||||
if (payload.userCnt === 2 && this.state.connectionLost) {
|
|
||||||
this.state.env === 'dev' && console.info('Reconnection process');
|
|
||||||
|
|
||||||
/** PUBLISH */
|
|
||||||
let cache = this.state.stepCache;
|
|
||||||
cache.forEach((item) => this.state.session.publish(this.state.channel, item));
|
|
||||||
this.setState({connectionLost: false, stepCache: []});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
connectWithWebsocket() {
|
|
||||||
/** Create Websocket w/ Bahnhof.js */
|
|
||||||
let websocket = WS.connect(
|
|
||||||
(this.state.ssl === 'true' ? "wss" : "ws") + "://" + window.location.hostname + "/ws/"
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Connect
|
|
||||||
* Session is an Autobahn JS WAMP session.
|
|
||||||
*/
|
|
||||||
websocket.on("socket/connect", (session) => {
|
|
||||||
this.state.env === 'dev' && console.info("Successfully connected to the Server!");
|
|
||||||
|
|
||||||
if (!this.state.connectionLost) {
|
|
||||||
let gridClient = this.state.gameInherited || new Grid().state.grid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Connect - RPC
|
|
||||||
* Send grid information to the server
|
|
||||||
*/
|
|
||||||
session
|
|
||||||
.call(
|
|
||||||
this.state.gameInherited ? "mineseeker-rpc/connectGame" : "mineseeker-rpc/startGame",
|
|
||||||
this.state.gameInherited ? this.state.gameAssoc : [window.btoa(JSON.stringify(gridClient)), this.state.gameAssoc]
|
|
||||||
)
|
|
||||||
.then(
|
|
||||||
(data) => {
|
|
||||||
this.state.env === 'dev' && console.info('RPC has been called');
|
|
||||||
|
|
||||||
let serverData = data[0] !== true
|
|
||||||
? JSON.parse(window.atob(data))
|
|
||||||
: data;
|
|
||||||
|
|
||||||
/** Check the grid if the user is inherited @see #30 */
|
|
||||||
if ((this.state.gameInherited && typeof serverData.grid !== 'undefined') || !this.state.gameInherited) {
|
|
||||||
this.wInit(session, serverData.grid, gridClient);
|
|
||||||
this.subscribe(this.state.gameInherited && serverData.users);
|
|
||||||
} else {
|
|
||||||
this.refs.gridControl.setState({
|
|
||||||
overlay: true,
|
|
||||||
overlayTitle: "This channel does not exists!",
|
|
||||||
overlaySubTitle: <a href={"/play"} target="_self">Restart game!</a>
|
|
||||||
});
|
|
||||||
|
|
||||||
console.error("This channel does not exists!");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
(error, desc) => this.state.env === 'dev' && console.error(["RPC Error", error, desc])
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
this.setState({session: session});
|
|
||||||
this.subscribe();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DisConnect
|
|
||||||
* Error provides us with some insight into the disconnection: error.reason and error.code
|
|
||||||
*/
|
|
||||||
websocket.on("socket/disconnect", (error) => {
|
|
||||||
this.state.env === 'dev' && console.error("Disconnected for " + error.reason + " with code " + error.code);
|
|
||||||
|
|
||||||
error.code === 6 && this.setState({connectionLost: true});
|
|
||||||
error.code === 3 && setTimeout(this.componentDidMount().bind(this), 500);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** After rendering */
|
|
||||||
componentDidMount() {
|
|
||||||
this.connectWithWebsocket();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Cache the steps unless reconnection
|
|
||||||
*
|
|
||||||
* @param dataPack
|
|
||||||
*/
|
|
||||||
cachePublish(dataPack) {
|
|
||||||
let cache = this.state.stepCache;
|
|
||||||
cache.push(dataPack);
|
|
||||||
this.setState({stepCache: cache});
|
|
||||||
}
|
|
||||||
|
|
||||||
onClick(coords) {
|
|
||||||
let activePlayer = this.refs.gridControl.refs.userControl.state.activePlayer ? 'blue' : 'red';
|
|
||||||
|
|
||||||
/** if the clicked field is NEVER CLICKED */
|
|
||||||
if (this.refs.gridControl.checkFieldHasBeenNeverClicked(coords[0], coords[1])) {
|
|
||||||
/** Player step and it is the current player */
|
|
||||||
if (activePlayer === this.refs.gridControl.state.webPlayer) {
|
|
||||||
/** STEP */
|
|
||||||
let points = this.makePointsCalcAndStep(coords);
|
|
||||||
|
|
||||||
/** THE END */
|
|
||||||
this.makeGameEndIfItEnds(points.blue, points.red);
|
|
||||||
|
|
||||||
let dataPack = {
|
|
||||||
'coords': coords,
|
|
||||||
'player': activePlayer,
|
|
||||||
'bomb': this.refs.gridControl.refs.userControl.state.bombSelected,
|
|
||||||
'redPoints': points.red,
|
|
||||||
'bluePoints': points.blue,
|
|
||||||
'resign': null,
|
|
||||||
'redExplodedBomb': activePlayer === 'red' && this.refs.gridControl.refs.userControl.state.bombSelected,
|
|
||||||
'blueExplodedBomb': activePlayer === 'blue' && this.refs.gridControl.refs.userControl.state.bombSelected
|
|
||||||
};
|
|
||||||
|
|
||||||
/** PUBLISH */
|
|
||||||
!this.state.connectionLost
|
|
||||||
? this.state.session.publish(this.state.channel, dataPack)
|
|
||||||
: this.cachePublish(dataPack);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<GridControl ref="gridControl"
|
|
||||||
env={this.props.env === 'dev'}
|
|
||||||
resign={this.resign.bind(this)}
|
|
||||||
onClick={this.onClick.bind(this)}/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default MineSeeker;
|
|
||||||
+12
-22
@@ -1,39 +1,29 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Kernel;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||||
use Symfony\Component\Console\Input\ArgvInput;
|
use Symfony\Component\Console\Input\ArgvInput;
|
||||||
use Symfony\Component\Debug\Debug;
|
use Symfony\Component\Debug\Debug;
|
||||||
use Symfony\Component\Dotenv\Dotenv;
|
|
||||||
|
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
|
||||||
|
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
|
||||||
|
//umask(0000);
|
||||||
|
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
require __DIR__.'/../vendor/autoload.php';
|
/**
|
||||||
|
* @var Composer\Autoload\ClassLoader $loader
|
||||||
if (!class_exists(Application::class)) {
|
*/
|
||||||
throw new \RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.');
|
$loader = require __DIR__.'/../app/autoload.php';
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($_SERVER['APP_ENV'])) {
|
|
||||||
if (!class_exists(Dotenv::class)) {
|
|
||||||
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.');
|
|
||||||
}
|
|
||||||
(new Dotenv())->load(__DIR__.'/../.env');
|
|
||||||
}
|
|
||||||
|
|
||||||
$input = new ArgvInput();
|
$input = new ArgvInput();
|
||||||
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true);
|
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
|
||||||
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true);
|
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
umask(0000);
|
Debug::enable();
|
||||||
|
|
||||||
if (class_exists(Debug::class)) {
|
|
||||||
Debug::enable();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$kernel = new Kernel($env, $debug);
|
$kernel = new AppKernel($env, $debug);
|
||||||
$application = new Application($kernel);
|
$application = new Application($kernel);
|
||||||
$application->run($input);
|
$application->run($input);
|
||||||
|
|||||||
Executable
+146
@@ -0,0 +1,146 @@
|
|||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once dirname(__FILE__).'/../var/SymfonyRequirements.php';
|
||||||
|
|
||||||
|
$lineSize = 70;
|
||||||
|
$symfonyRequirements = new SymfonyRequirements();
|
||||||
|
$iniPath = $symfonyRequirements->getPhpIniConfigPath();
|
||||||
|
|
||||||
|
echo_title('Symfony Requirements Checker');
|
||||||
|
|
||||||
|
echo '> PHP is using the following php.ini file:'.PHP_EOL;
|
||||||
|
if ($iniPath) {
|
||||||
|
echo_style('green', ' '.$iniPath);
|
||||||
|
} else {
|
||||||
|
echo_style('yellow', ' WARNING: No configuration file (php.ini) used by PHP!');
|
||||||
|
}
|
||||||
|
|
||||||
|
echo PHP_EOL.PHP_EOL;
|
||||||
|
|
||||||
|
echo '> Checking Symfony requirements:'.PHP_EOL.' ';
|
||||||
|
|
||||||
|
$messages = array();
|
||||||
|
foreach ($symfonyRequirements->getRequirements() as $req) {
|
||||||
|
if ($helpText = get_error_message($req, $lineSize)) {
|
||||||
|
echo_style('red', 'E');
|
||||||
|
$messages['error'][] = $helpText;
|
||||||
|
} else {
|
||||||
|
echo_style('green', '.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$checkPassed = empty($messages['error']);
|
||||||
|
|
||||||
|
foreach ($symfonyRequirements->getRecommendations() as $req) {
|
||||||
|
if ($helpText = get_error_message($req, $lineSize)) {
|
||||||
|
echo_style('yellow', 'W');
|
||||||
|
$messages['warning'][] = $helpText;
|
||||||
|
} else {
|
||||||
|
echo_style('green', '.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($checkPassed) {
|
||||||
|
echo_block('success', 'OK', 'Your system is ready to run Symfony projects');
|
||||||
|
} else {
|
||||||
|
echo_block('error', 'ERROR', 'Your system is not ready to run Symfony projects');
|
||||||
|
|
||||||
|
echo_title('Fix the following mandatory requirements', 'red');
|
||||||
|
|
||||||
|
foreach ($messages['error'] as $helpText) {
|
||||||
|
echo ' * '.$helpText.PHP_EOL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($messages['warning'])) {
|
||||||
|
echo_title('Optional recommendations to improve your setup', 'yellow');
|
||||||
|
|
||||||
|
foreach ($messages['warning'] as $helpText) {
|
||||||
|
echo ' * '.$helpText.PHP_EOL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo PHP_EOL;
|
||||||
|
echo_style('title', 'Note');
|
||||||
|
echo ' The command console could use a different php.ini file'.PHP_EOL;
|
||||||
|
echo_style('title', '~~~~');
|
||||||
|
echo ' than the one used with your web server. To be on the'.PHP_EOL;
|
||||||
|
echo ' safe side, please check the requirements from your web'.PHP_EOL;
|
||||||
|
echo ' server using the ';
|
||||||
|
echo_style('yellow', 'web/config.php');
|
||||||
|
echo ' script.'.PHP_EOL;
|
||||||
|
echo PHP_EOL;
|
||||||
|
|
||||||
|
exit($checkPassed ? 0 : 1);
|
||||||
|
|
||||||
|
function get_error_message(Requirement $requirement, $lineSize)
|
||||||
|
{
|
||||||
|
if ($requirement->isFulfilled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL;
|
||||||
|
$errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL;
|
||||||
|
|
||||||
|
return $errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
function echo_title($title, $style = null)
|
||||||
|
{
|
||||||
|
$style = $style ?: 'title';
|
||||||
|
|
||||||
|
echo PHP_EOL;
|
||||||
|
echo_style($style, $title.PHP_EOL);
|
||||||
|
echo_style($style, str_repeat('~', strlen($title)).PHP_EOL);
|
||||||
|
echo PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
function echo_style($style, $message)
|
||||||
|
{
|
||||||
|
// ANSI color codes
|
||||||
|
$styles = array(
|
||||||
|
'reset' => "\033[0m",
|
||||||
|
'red' => "\033[31m",
|
||||||
|
'green' => "\033[32m",
|
||||||
|
'yellow' => "\033[33m",
|
||||||
|
'error' => "\033[37;41m",
|
||||||
|
'success' => "\033[37;42m",
|
||||||
|
'title' => "\033[34m",
|
||||||
|
);
|
||||||
|
$supports = has_color_support();
|
||||||
|
|
||||||
|
echo($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : '');
|
||||||
|
}
|
||||||
|
|
||||||
|
function echo_block($style, $title, $message)
|
||||||
|
{
|
||||||
|
$message = ' '.trim($message).' ';
|
||||||
|
$width = strlen($message);
|
||||||
|
|
||||||
|
echo PHP_EOL.PHP_EOL;
|
||||||
|
|
||||||
|
echo_style($style, str_repeat(' ', $width));
|
||||||
|
echo PHP_EOL;
|
||||||
|
echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT));
|
||||||
|
echo PHP_EOL;
|
||||||
|
echo_style($style, $message);
|
||||||
|
echo PHP_EOL;
|
||||||
|
echo_style($style, str_repeat(' ', $width));
|
||||||
|
echo PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
function has_color_support()
|
||||||
|
{
|
||||||
|
static $support;
|
||||||
|
|
||||||
|
if (null === $support) {
|
||||||
|
if (DIRECTORY_SEPARATOR == '\\') {
|
||||||
|
$support = false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
|
||||||
|
} else {
|
||||||
|
$support = function_exists('posix_isatty') && @posix_isatty(STDOUT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $support;
|
||||||
|
}
|
||||||
+52
-56
@@ -1,76 +1,72 @@
|
|||||||
{
|
{
|
||||||
"type": "project",
|
"name": "root/mine",
|
||||||
"license": "proprietary",
|
"license": "proprietary",
|
||||||
"require": {
|
"type": "project",
|
||||||
"php": "^7.3",
|
|
||||||
"ext-iconv": "*",
|
|
||||||
"ext-json": "*",
|
|
||||||
"doctrine/doctrine-migrations-bundle": "^2.0",
|
|
||||||
"doctrine/orm": "^2.6",
|
|
||||||
"gos/web-socket-bundle": "^1.8",
|
|
||||||
"sensio/framework-extra-bundle": "^5.5",
|
|
||||||
"sonata-project/admin-bundle": "^3.0",
|
|
||||||
"sonata-project/doctrine-orm-admin-bundle": "^3.0",
|
|
||||||
"sonata-project/user-bundle": "^4.0",
|
|
||||||
"symfony/console": "^4.0",
|
|
||||||
"symfony/flex": "^1.0",
|
|
||||||
"symfony/framework-bundle": "^4.0",
|
|
||||||
"symfony/mailer": "^4.0",
|
|
||||||
"symfony/monolog-bundle": "^3.4",
|
|
||||||
"symfony/orm-pack": "^1.0",
|
|
||||||
"symfony/polyfill-apcu": "^1.0",
|
|
||||||
"symfony/twig-bundle": "^4.0",
|
|
||||||
"symfony/webpack-encore-bundle": "^1.7",
|
|
||||||
"symfony/yaml": "^4.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"roave/security-advisories": "dev-master",
|
|
||||||
"symfony/dotenv": "^4.0",
|
|
||||||
"symfony/profiler-pack": "^1.0",
|
|
||||||
"symfony/maker-bundle": "^1.5"
|
|
||||||
},
|
|
||||||
"config": {
|
|
||||||
"preferred-install": {
|
|
||||||
"*": "dist"
|
|
||||||
},
|
|
||||||
"sort-packages": true
|
|
||||||
},
|
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"App\\": "src/"
|
"": "src/"
|
||||||
}
|
},
|
||||||
|
"classmap": [
|
||||||
|
"app/AppKernel.php",
|
||||||
|
"app/AppCache.php"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"App\\Tests\\": "tests/"
|
"Tests\\": "tests/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"replace": {
|
"require": {
|
||||||
"symfony/polyfill-iconv": "*",
|
"php": ">=5.5.9",
|
||||||
"symfony/polyfill-php73": "*",
|
"symfony/symfony": "3.1.*",
|
||||||
"symfony/polyfill-php72": "*",
|
"doctrine/orm": "^2.5",
|
||||||
"symfony/polyfill-php71": "*",
|
"doctrine/doctrine-bundle": "^1.6",
|
||||||
"symfony/polyfill-php70": "*",
|
"doctrine/doctrine-cache-bundle": "^1.3",
|
||||||
"symfony/polyfill-php56": "*"
|
"symfony/swiftmailer-bundle": "^2.3",
|
||||||
|
"symfony/monolog-bundle": "^2.8",
|
||||||
|
"symfony/polyfill-apcu": "^1.0",
|
||||||
|
"sensio/distribution-bundle": "^5.0",
|
||||||
|
"sensio/framework-extra-bundle": "^3.0.2",
|
||||||
|
"incenteev/composer-parameter-handler": "^2.0",
|
||||||
|
"gos/web-socket-bundle": "^1.8",
|
||||||
|
"friendsofsymfony/user-bundle": "~2.0@dev",
|
||||||
|
"doctrine/doctrine-migrations-bundle": "^1.0",
|
||||||
|
"symfony/assetic-bundle": "^2.8",
|
||||||
|
"predis/predis": "^1.0",
|
||||||
|
"snc/redis-bundle": "^2.0",
|
||||||
|
"hwi/oauth-bundle": "^0.5.1",
|
||||||
|
"cleentfaar/slack-bundle": "^0.20.1",
|
||||||
|
"symfony/translation": "^3.2"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"sensio/generator-bundle": "^3.0",
|
||||||
|
"symfony/phpunit-bridge": "^3.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"auto-scripts": {
|
"symfony-scripts": [
|
||||||
"cache:clear": "symfony-cmd",
|
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
|
||||||
"assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd"
|
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
|
||||||
},
|
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
|
||||||
|
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
|
||||||
|
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
|
||||||
|
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
|
||||||
|
],
|
||||||
"post-install-cmd": [
|
"post-install-cmd": [
|
||||||
"@auto-scripts"
|
"@symfony-scripts"
|
||||||
],
|
],
|
||||||
"post-update-cmd": [
|
"post-update-cmd": [
|
||||||
"@auto-scripts"
|
"@symfony-scripts"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"conflict": {
|
|
||||||
"symfony/symfony": "*"
|
|
||||||
},
|
|
||||||
"extra": {
|
"extra": {
|
||||||
"symfony": {
|
"symfony-app-dir": "app",
|
||||||
"allow-contrib": false
|
"symfony-bin-dir": "bin",
|
||||||
|
"symfony-var-dir": "var",
|
||||||
|
"symfony-web-dir": "web",
|
||||||
|
"symfony-tests-dir": "tests",
|
||||||
|
"symfony-assets-install": "relative",
|
||||||
|
"incenteev-parameters": {
|
||||||
|
"file": "app/config/parameters.yml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+1993
-5375
File diff suppressed because it is too large
Load Diff
@@ -1,27 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
|
|
||||||
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
|
||||||
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
|
|
||||||
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
|
||||||
Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true],
|
|
||||||
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
|
|
||||||
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
|
|
||||||
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
|
||||||
Sonata\DatagridBundle\SonataDatagridBundle::class => ['all' => true],
|
|
||||||
Sonata\CoreBundle\SonataCoreBundle::class => ['all' => true],
|
|
||||||
Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true],
|
|
||||||
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
|
|
||||||
Sonata\AdminBundle\SonataAdminBundle::class => ['all' => true],
|
|
||||||
Sonata\EasyExtendsBundle\SonataEasyExtendsBundle::class => ['all' => true],
|
|
||||||
FOS\UserBundle\FOSUserBundle::class => ['all' => true],
|
|
||||||
Sonata\UserBundle\SonataUserBundle::class => ['all' => true],
|
|
||||||
App\Application\Sonata\UserBundle\ApplicationSonataUserBundle::class => ['all' => true],
|
|
||||||
Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle::class => ['all' => true],
|
|
||||||
Gos\Bundle\PubSubRouterBundle\GosPubSubRouterBundle::class => ['all' => true],
|
|
||||||
Gos\Bundle\WebSocketBundle\GosWebSocketBundle::class => ['all' => true],
|
|
||||||
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
|
|
||||||
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
|
||||||
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
|
|
||||||
];
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
framework:
|
|
||||||
assets:
|
|
||||||
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
monolog:
|
|
||||||
handlers:
|
|
||||||
main:
|
|
||||||
type: stream
|
|
||||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
|
||||||
level: error
|
|
||||||
channels: ["!event"]
|
|
||||||
# uncomment to get logging in your browser
|
|
||||||
# you may have to allow bigger header sizes in your Web server configuration
|
|
||||||
#firephp:
|
|
||||||
# type: firephp
|
|
||||||
# level: info
|
|
||||||
#chromephp:
|
|
||||||
# type: chromephp
|
|
||||||
# level: info
|
|
||||||
console:
|
|
||||||
type: console
|
|
||||||
process_psr_3_messages: false
|
|
||||||
channels: ["!event", "!doctrine", "!console"]
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
framework:
|
|
||||||
router:
|
|
||||||
strict_requirements: true
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
web_profiler:
|
|
||||||
toolbar: true
|
|
||||||
intercept_redirects: false
|
|
||||||
|
|
||||||
framework:
|
|
||||||
profiler: { only_exceptions: false }
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
parameters:
|
|
||||||
# Adds a fallback DATABASE_URL if the env var is not set.
|
|
||||||
# This allows you to run cache:warmup even if your
|
|
||||||
# environment variables are not available yet.
|
|
||||||
# You should not need to change this value.
|
|
||||||
env(DATABASE_URL): ''
|
|
||||||
|
|
||||||
doctrine:
|
|
||||||
dbal:
|
|
||||||
# configure these for your database server
|
|
||||||
driver: 'pdo_mysql'
|
|
||||||
server_version: '5.7'
|
|
||||||
charset: utf8mb4
|
|
||||||
default_table_options:
|
|
||||||
charset: utf8mb4
|
|
||||||
collate: utf8mb4_unicode_ci
|
|
||||||
|
|
||||||
url: '%env(resolve:DATABASE_URL)%'
|
|
||||||
types:
|
|
||||||
json: Sonata\Doctrine\Types\JsonType
|
|
||||||
orm:
|
|
||||||
auto_generate_proxy_classes: '%kernel.debug%'
|
|
||||||
naming_strategy: doctrine.orm.naming_strategy.underscore
|
|
||||||
auto_mapping: true
|
|
||||||
mappings:
|
|
||||||
App:
|
|
||||||
is_bundle: false
|
|
||||||
type: annotation
|
|
||||||
dir: '%kernel.project_dir%/src/Entity'
|
|
||||||
prefix: 'App\Entity'
|
|
||||||
alias: App
|
|
||||||
SonataUserBundle: ~
|
|
||||||
FOSUserBundle: ~
|
|
||||||
ApplicationSonataUserBundle: ~
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
doctrine_migrations:
|
|
||||||
dir_name: '%kernel.project_dir%/src/Migrations'
|
|
||||||
# namespace is arbitrary but should be different from App\Migrations
|
|
||||||
# as migrations classes should NOT be autoloaded
|
|
||||||
namespace: DoctrineMigrations
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
fos_user:
|
|
||||||
db_driver: orm # can be orm or odm
|
|
||||||
firewall_name: main
|
|
||||||
user_class: App\Application\Sonata\UserBundle\Entity\User
|
|
||||||
group:
|
|
||||||
group_class: App\Application\Sonata\UserBundle\Entity\Group
|
|
||||||
group_manager: sonata.user.orm.group_manager # If you're using doctrine orm (use sonata.user.mongodb.group_manager for mongodb)
|
|
||||||
service:
|
|
||||||
user_manager: sonata.user.orm.user_manager
|
|
||||||
mailer: 'fos_user.mailer.noop'
|
|
||||||
from_email:
|
|
||||||
address: '%env(MAILER_USER_ADDRESS)%'
|
|
||||||
sender_name: '%env(MAILER_USER_NAME)%'
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
framework:
|
|
||||||
secret: '%env(APP_SECRET)%'
|
|
||||||
#default_locale: en
|
|
||||||
#csrf_protection: true
|
|
||||||
#http_method_override: true
|
|
||||||
templating:
|
|
||||||
engines: ['twig']
|
|
||||||
|
|
||||||
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
|
||||||
# Remove or comment this section to explicitly disable session support.
|
|
||||||
session:
|
|
||||||
handler_id: ~
|
|
||||||
|
|
||||||
#esi: true
|
|
||||||
#fragments: true
|
|
||||||
php_errors:
|
|
||||||
log: true
|
|
||||||
|
|
||||||
cache:
|
|
||||||
# Put the unique name of your app here: the prefix seed
|
|
||||||
# is used to compute stable namespaces for cache keys.
|
|
||||||
#prefix_seed: your_vendor_name/app_name
|
|
||||||
|
|
||||||
# The app cache caches to the filesystem by default.
|
|
||||||
# Other options include:
|
|
||||||
|
|
||||||
# Redis
|
|
||||||
#app: cache.adapter.redis
|
|
||||||
#default_redis_provider: redis://localhost
|
|
||||||
|
|
||||||
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
|
|
||||||
#app: cache.adapter.apcu
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
#doctrine_cache:
|
|
||||||
# providers:
|
|
||||||
# redis_cache:
|
|
||||||
# redis:
|
|
||||||
# host: localhost
|
|
||||||
# port: 6379
|
|
||||||
# database: 3
|
|
||||||
# websocket_cache_client:
|
|
||||||
# type: redis
|
|
||||||
# alias: gos_web_socket.client_storage.driver.redis
|
|
||||||
|
|
||||||
gos_web_socket:
|
|
||||||
server:
|
|
||||||
host: 0.0.0.0
|
|
||||||
port: "%mineseeker.websocket%"
|
|
||||||
router:
|
|
||||||
resources:
|
|
||||||
- '%kernel.project_dir%/config/pubsub/routing.yaml'
|
|
||||||
client:
|
|
||||||
firewall: secured_area
|
|
||||||
# session_handler: "@session.handler.pdo"
|
|
||||||
# storage:
|
|
||||||
# driver: "@gos_web_socket.client_storage.driver.predis"
|
|
||||||
# ttl: 28800 #(optionally) time to live if you use redis driver
|
|
||||||
# prefix: client #(optionally) prefix if you use redis driver, create key "client:1" instead key "1"
|
|
||||||
periodic:
|
|
||||||
- '@mineseeker.periodic'
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
framework:
|
|
||||||
mailer:
|
|
||||||
dsn: '%env(MAILER_DSN)%'
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
doctrine:
|
|
||||||
orm:
|
|
||||||
metadata_cache_driver:
|
|
||||||
type: service
|
|
||||||
id: doctrine.system_cache_provider
|
|
||||||
query_cache_driver:
|
|
||||||
type: service
|
|
||||||
id: doctrine.system_cache_provider
|
|
||||||
result_cache_driver:
|
|
||||||
type: service
|
|
||||||
id: doctrine.result_cache_provider
|
|
||||||
|
|
||||||
services:
|
|
||||||
doctrine.result_cache_provider:
|
|
||||||
class: Symfony\Component\Cache\DoctrineProvider
|
|
||||||
public: false
|
|
||||||
arguments:
|
|
||||||
- '@doctrine.result_cache_pool'
|
|
||||||
doctrine.system_cache_provider:
|
|
||||||
class: Symfony\Component\Cache\DoctrineProvider
|
|
||||||
public: false
|
|
||||||
arguments:
|
|
||||||
- '@doctrine.system_cache_pool'
|
|
||||||
|
|
||||||
framework:
|
|
||||||
cache:
|
|
||||||
pools:
|
|
||||||
doctrine.result_cache_pool:
|
|
||||||
adapter: cache.app
|
|
||||||
doctrine.system_cache_pool:
|
|
||||||
adapter: cache.system
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
monolog:
|
|
||||||
handlers:
|
|
||||||
main:
|
|
||||||
type: fingers_crossed
|
|
||||||
action_level: error
|
|
||||||
handler: nested
|
|
||||||
excluded_http_codes: [404, 405]
|
|
||||||
nested:
|
|
||||||
type: stream
|
|
||||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
|
||||||
level: debug
|
|
||||||
console:
|
|
||||||
type: console
|
|
||||||
process_psr_3_messages: false
|
|
||||||
channels: ["!event", "!doctrine"]
|
|
||||||
deprecation:
|
|
||||||
type: stream
|
|
||||||
path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"
|
|
||||||
deprecation_filter:
|
|
||||||
type: filter
|
|
||||||
handler: deprecation
|
|
||||||
max_level: info
|
|
||||||
channels: ["php"]
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#webpack_encore:
|
|
||||||
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
|
|
||||||
# Available in version 1.2
|
|
||||||
#cache: true
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
framework:
|
|
||||||
router:
|
|
||||||
strict_requirements: ~
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
security:
|
|
||||||
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
|
|
||||||
providers:
|
|
||||||
in_memory: { memory: ~ }
|
|
||||||
firewalls:
|
|
||||||
dev:
|
|
||||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
|
||||||
security: false
|
|
||||||
main:
|
|
||||||
anonymous: true
|
|
||||||
|
|
||||||
# activate different ways to authenticate
|
|
||||||
|
|
||||||
# http_basic: true
|
|
||||||
# https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
|
|
||||||
|
|
||||||
# form_login: true
|
|
||||||
# https://symfony.com/doc/current/security/form_login_setup.html
|
|
||||||
|
|
||||||
# Easy way to control access for large sections of your site
|
|
||||||
# Note: Only the *first* access control that matches will be used
|
|
||||||
access_control:
|
|
||||||
# - { path: ^/admin, roles: ROLE_ADMIN }
|
|
||||||
# - { path: ^/profile, roles: ROLE_USER }
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
sensio_framework_extra:
|
|
||||||
router:
|
|
||||||
annotations: false
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
sonata_admin:
|
|
||||||
title: 'Sonata Admin'
|
|
||||||
dashboard:
|
|
||||||
blocks:
|
|
||||||
- { type: sonata.admin.block.admin_list, position: left }
|
|
||||||
|
|
||||||
sonata_block:
|
|
||||||
blocks:
|
|
||||||
sonata.admin.block.admin_list:
|
|
||||||
contexts: [admin]
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
sonata_core:
|
|
||||||
form:
|
|
||||||
mapping:
|
|
||||||
enabled: false
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
sonata_user:
|
|
||||||
security_acl: false
|
|
||||||
manager_type: orm # can be orm or mongodb
|
|
||||||
class:
|
|
||||||
user: App\Application\Sonata\UserBundle\Entity\User
|
|
||||||
group: App\Application\Sonata\UserBundle\Entity\Group
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
framework:
|
|
||||||
test: true
|
|
||||||
session:
|
|
||||||
storage_id: session.storage.mock_file
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
monolog:
|
|
||||||
handlers:
|
|
||||||
main:
|
|
||||||
type: stream
|
|
||||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
|
||||||
level: debug
|
|
||||||
channels: ["!event"]
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
web_profiler:
|
|
||||||
toolbar: false
|
|
||||||
intercept_redirects: false
|
|
||||||
|
|
||||||
framework:
|
|
||||||
profiler: { collect: false }
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
framework:
|
|
||||||
default_locale: '%locale%'
|
|
||||||
translator:
|
|
||||||
paths:
|
|
||||||
- '%kernel.project_dir%/translations'
|
|
||||||
fallbacks:
|
|
||||||
- '%locale%'
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
twig:
|
|
||||||
paths: ['%kernel.project_dir%/templates']
|
|
||||||
debug: '%kernel.debug%'
|
|
||||||
strict_variables: '%kernel.debug%'
|
|
||||||
globals:
|
|
||||||
version: "%jotunheimr.version%"
|
|
||||||
facebook_api: "%facebook.api%"
|
|
||||||
facebook_scope: "%facebook.scope%"
|
|
||||||
facebook_api_version: "%facebook.version%"
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
services:
|
|
||||||
_defaults:
|
|
||||||
public: false
|
|
||||||
autowire: true
|
|
||||||
autoconfigure: true
|
|
||||||
|
|
||||||
#Twig\Extensions\ArrayExtension: ~
|
|
||||||
#Twig\Extensions\DateExtension: ~
|
|
||||||
#Twig\Extensions\IntlExtension: ~
|
|
||||||
#Twig\Extensions\TextExtension: ~
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
webpack_encore:
|
|
||||||
# The path where Encore is building the assets.
|
|
||||||
# This should match Encore.setOutputPath() in webpack.config.js.
|
|
||||||
output_path: '%kernel.project_dir%/public/build'
|
|
||||||
# If multiple builds are defined (as shown below), you can disable the default build:
|
|
||||||
# output_path: false
|
|
||||||
|
|
||||||
# if using Encore.enableIntegrityHashes() specify the crossorigin attribute value (default: false, or use 'anonymous' or 'use-credentials')
|
|
||||||
# crossorigin: 'anonymous'
|
|
||||||
|
|
||||||
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes).
|
|
||||||
# To enable caching for the production environment, creating a webpack_encore.yaml in the config/packages/prod directory with this value set to true
|
|
||||||
# Available in version 1.2
|
|
||||||
#cache: false
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#index:
|
|
||||||
# path: /
|
|
||||||
# controller: App\Controller\DefaultController::index
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
controllers:
|
|
||||||
resource: ../../src/Controller/
|
|
||||||
type: annotation
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
_errors:
|
|
||||||
resource: '@TwigBundle/Resources/config/routing/errors.xml'
|
|
||||||
prefix: /_error
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
web_profiler_wdt:
|
|
||||||
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
|
|
||||||
prefix: /_wdt
|
|
||||||
|
|
||||||
web_profiler_profiler:
|
|
||||||
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
|
|
||||||
prefix: /_profiler
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
MineSeekerBundle_homepage:
|
|
||||||
path: /
|
|
||||||
controller: App\Controller\GameController:index
|
|
||||||
|
|
||||||
MineSeekerBundle_gamePlay:
|
|
||||||
path: /play
|
|
||||||
controller: App\Controller\GameController:play
|
|
||||||
|
|
||||||
MineSeekerBundle_gamePlayWId:
|
|
||||||
path: /play/{gameAssoc}
|
|
||||||
controller: App\Controller\GameController:play
|
|
||||||
|
|
||||||
MineSeekerBundle_terms:
|
|
||||||
path: /terms-of-service
|
|
||||||
controller: App\Controller\GameController:terms
|
|
||||||
|
|
||||||
MineSeekerBundle_privacy:
|
|
||||||
path: /privacy-policy
|
|
||||||
controller: App\Controller\GameController:privacy
|
|
||||||
|
|
||||||
MineSeekerBundle_contact:
|
|
||||||
path: /contact
|
|
||||||
controller: App\Controller\GameController:contact
|
|
||||||
|
|
||||||
MineSeekerBundle_landing:
|
|
||||||
path: /landing-page
|
|
||||||
controller: App\Controller\GameController:landing
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
admin_area:
|
|
||||||
resource: "@SonataAdminBundle/Resources/config/routing/sonata_admin.xml"
|
|
||||||
prefix: /admin
|
|
||||||
|
|
||||||
_sonata_admin:
|
|
||||||
resource: .
|
|
||||||
type: sonata_admin
|
|
||||||
prefix: /admin
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
sonata_user_admin_security:
|
|
||||||
resource: '@SonataUserBundle/Resources/config/routing/admin_security.xml'
|
|
||||||
prefix: /admin
|
|
||||||
|
|
||||||
sonata_user_admin_resetting:
|
|
||||||
resource: '@SonataUserBundle/Resources/config/routing/admin_resetting.xml'
|
|
||||||
prefix: /admin/resetting
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
# Put parameters here that don't need to change on each machine where the app is deployed
|
|
||||||
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
|
|
||||||
parameters:
|
|
||||||
locale: 'en'
|
|
||||||
jotunheimr.version: 1.1.0-20191026
|
|
||||||
facebook.api: 320599508311862
|
|
||||||
facebook.api-secret: 18d4f48cdd274bccee2678e5eff3f557
|
|
||||||
facebook.version: 'v2.8'
|
|
||||||
facebook.scope: 'public_profile,email,user_friends'
|
|
||||||
mineseeker.websocket: 6450
|
|
||||||
|
|
||||||
services:
|
|
||||||
# default configuration for services in *this* file
|
|
||||||
_defaults:
|
|
||||||
autowire: true # Automatically injects dependencies in your services.
|
|
||||||
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
|
|
||||||
public: false # Allows optimizing the container by removing unused services; this also means
|
|
||||||
# fetching services directly from the container via $container->get() won't work.
|
|
||||||
# The best practice is to be explicit about your dependencies anyway.
|
|
||||||
|
|
||||||
# makes classes in src/ available to be used as services
|
|
||||||
# this creates a service per class whose id is the fully-qualified class name
|
|
||||||
App\:
|
|
||||||
resource: '../src/*'
|
|
||||||
exclude: '../src/{Entity,Migrations,Tests,Kernel.php}'
|
|
||||||
|
|
||||||
# controllers are imported separately to make sure services can be injected
|
|
||||||
# as action arguments even if you don't extend any base controller class
|
|
||||||
App\Controller\:
|
|
||||||
resource: '../src/Controller'
|
|
||||||
tags: ['controller.service_arguments']
|
|
||||||
|
|
||||||
# add more service definitions when explicit configuration is needed
|
|
||||||
# please note that last definitions always *replace* previous ones
|
|
||||||
|
|
||||||
mineseeker.periodic:
|
|
||||||
class: App\Periodic\MinePeriodic
|
|
||||||
tags:
|
|
||||||
- { name: gos_web_socket.periodic }
|
|
||||||
arguments:
|
|
||||||
- '@gos_web_socket.pdo.periodic_ping'
|
|
||||||
|
|
||||||
mineseeker.topic_sample_service:
|
|
||||||
class: App\Topic\MineseekerTopic
|
|
||||||
tags:
|
|
||||||
- { name: gos_web_socket.topic }
|
|
||||||
|
|
||||||
mineseeker.rpc_sample_service:
|
|
||||||
class: App\Rpc\MineseekerRpc
|
|
||||||
public: true
|
|
||||||
tags:
|
|
||||||
- { name: gos_web_socket.rpc }
|
|
||||||
|
|
||||||
gos_web_socket_server.client_event.listener:
|
|
||||||
class: App\EventListener\MineseekerClientEventListener
|
|
||||||
tags:
|
|
||||||
- { name: kernel.event_listener, event: 'gos_web_socket.client_connected', method: onClientConnect }
|
|
||||||
- { name: kernel.event_listener, event: 'gos_web_socket.client_disconnected', method: onClientDisconnect }
|
|
||||||
- { name: kernel.event_listener, event: 'gos_web_socket.client_error', method: onClientError }
|
|
||||||
- { name: kernel.event_listener, event: 'gos_web_socket.server_launched', method: onServerStart }
|
|
||||||
- { name: kernel.event_listener, event: 'gos_web_socket.client_rejected', method: onClientRejected }
|
|
||||||
+38
-44
@@ -1,46 +1,40 @@
|
|||||||
{
|
{
|
||||||
"name": "mine-seeker",
|
"name": "mine-seeker",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Mine Seeker Game by system7",
|
"description": "Mine Seeker Game by system7",
|
||||||
"keywords": [
|
"directories": {
|
||||||
"mine",
|
"test": "tests"
|
||||||
"seeker",
|
},
|
||||||
"game",
|
"dependencies": {
|
||||||
"multiplayer",
|
"babel-core": "^6.14.0",
|
||||||
"websocket"
|
"babel-loader": "^6.2.5",
|
||||||
],
|
"babel-preset-es2015": "^6.14.0",
|
||||||
"author": "Laszlo Lang <system7>",
|
"babel-preset-es2016": "^6.22.0",
|
||||||
"license": "UNLICENSED",
|
"babel-preset-es2017": "^6.22.0",
|
||||||
"private": true,
|
"babel-preset-react": "^6.11.1",
|
||||||
"dependencies": {
|
"howler": "^2.0.1",
|
||||||
"@fortawesome/fontawesome-free": "^5.2.0",
|
"js-base64": "^2.1.9",
|
||||||
"autobahn": "^19.10.1",
|
"react": "^15.3.2",
|
||||||
"bootstrap": "3",
|
"react-dom": "^15.3.2",
|
||||||
"buffer": "^5.4.3",
|
"uglify-js": "^2.7.4",
|
||||||
"howler": "^2.1.2",
|
"uglifycss": "0.0.25",
|
||||||
"jquery": "^3.4.1",
|
"webpack": "^1.13.3"
|
||||||
"js-base64": "^2.1.9",
|
},
|
||||||
"prop-types": "^15.7.2",
|
"devDependencies": {},
|
||||||
"react": "^16.11.0",
|
"scripts": {
|
||||||
"react-dom": "^16.11.0",
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
"uglify-js": "^2.7.4",
|
},
|
||||||
"uglifycss": "0.0.25"
|
"repository": {
|
||||||
},
|
"type": "git",
|
||||||
"devDependencies": {
|
"url": "ssh://Lang@amelia:/home/git/repositories/mine.git"
|
||||||
"@babel/preset-react": "^7.6.3",
|
},
|
||||||
"@symfony/webpack-encore": "^0.28.0",
|
"keywords": [
|
||||||
"autoprefixer": "^7.2.2",
|
"mine",
|
||||||
"babel-polyfill": "^6.26.0",
|
"seeker",
|
||||||
"babel-preset-env": "^1.7.0",
|
"game",
|
||||||
"core-js": "^3.0.0",
|
"multiplayer",
|
||||||
"node-sass": "^4.12.0",
|
"websocket"
|
||||||
"sass-loader": "^7.1.0",
|
],
|
||||||
"webpack-notifier": "^1.6.0"
|
"author": "Laszlo Lang <system7> www.laszlolang.com",
|
||||||
},
|
"license": "ISC"
|
||||||
"scripts": {
|
|
||||||
"dev-server": "encore dev-server",
|
|
||||||
"dev": "encore dev",
|
|
||||||
"watch": "encore dev --watch",
|
|
||||||
"build": "encore production"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
|
||||||
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
|
||||||
|
backupGlobals="false"
|
||||||
|
colors="true"
|
||||||
|
bootstrap="app/autoload.php"
|
||||||
|
>
|
||||||
|
<php>
|
||||||
|
<ini name="error_reporting" value="-1" />
|
||||||
|
<server name="KERNEL_DIR" value="app/" />
|
||||||
|
</php>
|
||||||
|
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Project Test Suite">
|
||||||
|
<directory>tests</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<whitelist>
|
||||||
|
<directory>src</directory>
|
||||||
|
<exclude>
|
||||||
|
<directory>src/*Bundle/Resources</directory>
|
||||||
|
<directory>src/*/*Bundle/Resources</directory>
|
||||||
|
<directory>src/*/Bundle/*Bundle/Resources</directory>
|
||||||
|
</exclude>
|
||||||
|
</whitelist>
|
||||||
|
</filter>
|
||||||
|
</phpunit>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
@@ -1,39 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use App\Kernel;
|
|
||||||
use Symfony\Component\Debug\Debug;
|
|
||||||
use Symfony\Component\Dotenv\Dotenv;
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
|
|
||||||
require __DIR__.'/../vendor/autoload.php';
|
|
||||||
|
|
||||||
// The check is to ensure we don't use .env in production
|
|
||||||
if (!isset($_SERVER['APP_ENV'])) {
|
|
||||||
if (!class_exists(Dotenv::class)) {
|
|
||||||
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.');
|
|
||||||
}
|
|
||||||
(new Dotenv())->load(__DIR__.'/../.env');
|
|
||||||
}
|
|
||||||
|
|
||||||
$env = $_SERVER['APP_ENV'] ?? 'dev';
|
|
||||||
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env));
|
|
||||||
|
|
||||||
if ($debug) {
|
|
||||||
umask(0000);
|
|
||||||
|
|
||||||
Debug::enable();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) {
|
|
||||||
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) {
|
|
||||||
Request::setTrustedHosts(explode(',', $trustedHosts));
|
|
||||||
}
|
|
||||||
|
|
||||||
$kernel = new Kernel($env, $debug);
|
|
||||||
$request = Request::createFromGlobals();
|
|
||||||
$response = $kernel->handle($request);
|
|
||||||
$response->send();
|
|
||||||
$kernel->terminate($request, $response);
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Application\Sonata\UserBundle;
|
|
||||||
|
|
||||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file has been generated by the SonataEasyExtendsBundle.
|
|
||||||
*
|
|
||||||
* @link https://sonata-project.org/easy-extends
|
|
||||||
*
|
|
||||||
* References:
|
|
||||||
* @link http://symfony.com/doc/current/book/bundles.html
|
|
||||||
*/
|
|
||||||
class ApplicationSonataUserBundle extends Bundle
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function getParent()
|
|
||||||
{
|
|
||||||
return 'SonataUserBundle';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Application\Sonata\UserBundle\Document;
|
|
||||||
|
|
||||||
use Sonata\UserBundle\Document\BaseGroup as BaseGroup;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file has been generated by the SonataEasyExtendsBundle.
|
|
||||||
*
|
|
||||||
* @link https://sonata-project.org/easy-extends
|
|
||||||
*
|
|
||||||
* References:
|
|
||||||
* @link http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/working-with-objects.html
|
|
||||||
*/
|
|
||||||
class Group extends BaseGroup
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var int $id
|
|
||||||
*/
|
|
||||||
protected $id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get id.
|
|
||||||
*
|
|
||||||
* @return int $id
|
|
||||||
*/
|
|
||||||
public function getId()
|
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Application\Sonata\UserBundle\Document;
|
|
||||||
|
|
||||||
use Sonata\UserBundle\Document\BaseUser as BaseUser;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file has been generated by the SonataEasyExtendsBundle.
|
|
||||||
*
|
|
||||||
* @link https://sonata-project.org/easy-extends
|
|
||||||
*
|
|
||||||
* References:
|
|
||||||
* @link http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/working-with-objects.html
|
|
||||||
*/
|
|
||||||
class User extends BaseUser
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var int $id
|
|
||||||
*/
|
|
||||||
protected $id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get id.
|
|
||||||
*
|
|
||||||
* @return int $id
|
|
||||||
*/
|
|
||||||
public function getId()
|
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Application\Sonata\UserBundle\Entity;
|
|
||||||
|
|
||||||
use Sonata\UserBundle\Entity\BaseGroup as BaseGroup;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file has been generated by the SonataEasyExtendsBundle.
|
|
||||||
*
|
|
||||||
* @link https://sonata-project.org/easy-extends
|
|
||||||
*
|
|
||||||
* References:
|
|
||||||
* @link http://www.doctrine-project.org/projects/orm/2.0/docs/reference/working-with-objects/en
|
|
||||||
*/
|
|
||||||
class Group extends BaseGroup
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var int $id
|
|
||||||
*/
|
|
||||||
protected $id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get id.
|
|
||||||
*
|
|
||||||
* @return int $id
|
|
||||||
*/
|
|
||||||
public function getId()
|
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Application\Sonata\UserBundle\Entity;
|
|
||||||
|
|
||||||
use Sonata\UserBundle\Entity\BaseUser as BaseUser;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file has been generated by the SonataEasyExtendsBundle.
|
|
||||||
*
|
|
||||||
* @link https://sonata-project.org/easy-extends
|
|
||||||
*
|
|
||||||
* References:
|
|
||||||
* @link http://www.doctrine-project.org/projects/orm/2.0/docs/reference/working-with-objects/en
|
|
||||||
*/
|
|
||||||
class User extends BaseUser
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var int $id
|
|
||||||
*/
|
|
||||||
protected $id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get id.
|
|
||||||
*
|
|
||||||
* @return int $id
|
|
||||||
*/
|
|
||||||
public function getId()
|
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<doctrine-mongo-mapping xmlns="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping
|
|
||||||
http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">
|
|
||||||
|
|
||||||
<document name="App\Application\Sonata\UserBundle\Document\Group" collection="fos_user_group">
|
|
||||||
|
|
||||||
<field fieldName="id" id="true" strategy="INCREMENT" />
|
|
||||||
|
|
||||||
</document>
|
|
||||||
|
|
||||||
</doctrine-mongo-mapping>
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
|
|
||||||
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
|
|
||||||
|
|
||||||
<entity name="App\Application\Sonata\UserBundle\Entity\Group" table="fos_user_group">
|
|
||||||
|
|
||||||
<id name="id" column="id" type="integer">
|
|
||||||
<generator strategy="AUTO" />
|
|
||||||
</id>
|
|
||||||
|
|
||||||
</entity>
|
|
||||||
|
|
||||||
</doctrine-mapping>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<doctrine-mongo-mapping xmlns="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping
|
|
||||||
http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">
|
|
||||||
|
|
||||||
<document name="App\Application\Sonata\UserBundle\Document\User" collection="fos_user_user" customId="true">
|
|
||||||
|
|
||||||
<field fieldName="id" id="true" strategy="INCREMENT" />
|
|
||||||
|
|
||||||
</document>
|
|
||||||
|
|
||||||
</doctrine-mongo-mapping>
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
|
|
||||||
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
|
|
||||||
|
|
||||||
<entity name="App\Application\Sonata\UserBundle\Entity\User" table="fos_user_user">
|
|
||||||
|
|
||||||
<id name="id" column="id" type="integer">
|
|
||||||
<generator strategy="AUTO" />
|
|
||||||
</id>
|
|
||||||
|
|
||||||
</entity>
|
|
||||||
|
|
||||||
</doctrine-mapping>
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<serializer>
|
|
||||||
<!-- This file has been generated by the SonataEasyExtendsBundle: https://sonata-project.org/bundles/easy-extends -->
|
|
||||||
<class name="App\Application\Sonata\UserBundle\Document\Group" exclusion-policy="all" xml-root-name="_group">
|
|
||||||
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search"/>
|
|
||||||
</class>
|
|
||||||
</serializer>
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<serializer>
|
|
||||||
<!-- This file has been generated by the SonataEasyExtendsBundle: https://sonata-project.org/bundles/easy-extends -->
|
|
||||||
<class name="App\Application\Sonata\UserBundle\Document\User" exclusion-policy="all" xml-root-name="_user">
|
|
||||||
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search"/>
|
|
||||||
</class>
|
|
||||||
</serializer>
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<serializer>
|
|
||||||
<!-- This file has been generated by the SonataEasyExtendsBundle: https://sonata-project.org/bundles/easy-extends -->
|
|
||||||
<class name="App\Application\Sonata\UserBundle\Entity\Group" exclusion-policy="all" xml-root-name="_group">
|
|
||||||
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search"/>
|
|
||||||
</class>
|
|
||||||
</serializer>
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<serializer>
|
|
||||||
<!-- This file has been generated by the SonataEasyExtendsBundle: https://sonata-project.org/bundles/easy-extends -->
|
|
||||||
<class name="App\Application\Sonata\UserBundle\Entity\User" exclusion-policy="all" xml-root-name="_user">
|
|
||||||
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search"/>
|
|
||||||
</class>
|
|
||||||
</serializer>
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* This file is part of the SplendidBear Websites' projects.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2019 @ www.splendidbear.org
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Controller;
|
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class GameController
|
|
||||||
*
|
|
||||||
* @package App\Controller
|
|
||||||
* @author system7 <https://www.splendidbear.org>
|
|
||||||
*/
|
|
||||||
class GameController extends AbstractController
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* It is the homepage
|
|
||||||
*
|
|
||||||
* @return Response
|
|
||||||
*/
|
|
||||||
public function index(): Response
|
|
||||||
{
|
|
||||||
return $this->render('Game/index.html.twig');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* It is the game itself
|
|
||||||
*
|
|
||||||
* @param Request $request
|
|
||||||
*
|
|
||||||
* @return Response
|
|
||||||
*/
|
|
||||||
public function play(Request $request): Response
|
|
||||||
{
|
|
||||||
return $this->render('Game/play.html.twig', array(
|
|
||||||
'env' => getenv('APP_ENV'),
|
|
||||||
'ssl' => $request->isSecure() ? 'true' : 'false'
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* It is the Privacy & Policy
|
|
||||||
*
|
|
||||||
* @return Response
|
|
||||||
*/
|
|
||||||
public function privacy(): Response
|
|
||||||
{
|
|
||||||
return $this->render('Official/privacy.html.twig');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* It is the Terms of Use
|
|
||||||
*
|
|
||||||
* @return Response
|
|
||||||
*/
|
|
||||||
public function terms(): Response
|
|
||||||
{
|
|
||||||
return $this->render('Official/terms.html.twig');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* It is the contact informations
|
|
||||||
*
|
|
||||||
* @return Response
|
|
||||||
*/
|
|
||||||
public function contact(): Response
|
|
||||||
{
|
|
||||||
return $this->render('Official/contact.html.twig');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* It is a landing page
|
|
||||||
*
|
|
||||||
* @return Response
|
|
||||||
*/
|
|
||||||
public function landing(): Response
|
|
||||||
{
|
|
||||||
return $this->render('Official/landing.html.twig');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* This file is part of the SplendidBear Websites' projects.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2019 @ www.splendidbear.org
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Entity;
|
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class Grid
|
|
||||||
*
|
|
||||||
* @package App\Entity
|
|
||||||
* @author system7 <https://www.splendidbear.org>
|
|
||||||
*
|
|
||||||
* @ORM\Entity(repositoryClass="App\Repository\GridRepository")
|
|
||||||
*/
|
|
||||||
class Grid
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @ORM\Id()
|
|
||||||
* @ORM\GeneratedValue()
|
|
||||||
* @ORM\Column(type="integer")
|
|
||||||
*/
|
|
||||||
private $id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var PlayedGame|null
|
|
||||||
*
|
|
||||||
* @ORM\OneToOne(targetEntity="App\Entity\PlayedGame", inversedBy="grid", cascade={"persist"})
|
|
||||||
*/
|
|
||||||
private $playedGame;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var GridRow|null
|
|
||||||
*
|
|
||||||
* @ORM\OneToMany(targetEntity="App\Entity\GridRow", mappedBy="grid", cascade={"persist"})
|
|
||||||
* @ORM\JoinColumn(name="grid_row", referencedColumnName="id", onDelete="CASCADE")
|
|
||||||
*/
|
|
||||||
private $gridRow;
|
|
||||||
|
|
||||||
public function getId(): ?int
|
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return PlayedGame|null
|
|
||||||
*/
|
|
||||||
public function getPlayedGame()
|
|
||||||
{
|
|
||||||
return $this->playedGame;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param PlayedGame|null $playedGame
|
|
||||||
*/
|
|
||||||
public function setPlayedGame( $playedGame): void
|
|
||||||
{
|
|
||||||
$this->playedGame = $playedGame;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return GridRow|null
|
|
||||||
*/
|
|
||||||
public function getGridRow()
|
|
||||||
{
|
|
||||||
return $this->gridRow;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param GridRow|null $gridRow
|
|
||||||
*/
|
|
||||||
public function setGridRow( $gridRow): void
|
|
||||||
{
|
|
||||||
$this->gridRow = $gridRow;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* This file is part of the SplendidBear Websites' projects.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2019 @ www.splendidbear.org
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Entity;
|
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class GridRow
|
|
||||||
*
|
|
||||||
* @package App\Entity
|
|
||||||
* @author system7 <https://www.splendidbear.org>
|
|
||||||
*
|
|
||||||
* @ORM\Entity(repositoryClass="App\Repository\GridRowRepository")
|
|
||||||
*/
|
|
||||||
class GridRow
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @ORM\Id()
|
|
||||||
* @ORM\GeneratedValue()
|
|
||||||
* @ORM\Column(type="integer")
|
|
||||||
*/
|
|
||||||
private $id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Grid|null
|
|
||||||
*
|
|
||||||
* @ORM\ManyToOne(targetEntity="App\Entity\Grid", inversedBy="gridRow", cascade={"persist"})
|
|
||||||
* @ORM\JoinColumn(name="grid", referencedColumnName="id", onDelete="CASCADE")
|
|
||||||
*/
|
|
||||||
private $grid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var array|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="grid_col", type="json_array", nullable=false)
|
|
||||||
*/
|
|
||||||
private $gridCol;
|
|
||||||
|
|
||||||
public function getId(): ?int
|
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Grid|null
|
|
||||||
*/
|
|
||||||
public function getGrid()
|
|
||||||
{
|
|
||||||
return $this->grid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Grid|null $grid
|
|
||||||
*/
|
|
||||||
public function setGrid( $grid): void
|
|
||||||
{
|
|
||||||
$this->grid = $grid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array|null
|
|
||||||
*/
|
|
||||||
public function getGridCol()
|
|
||||||
{
|
|
||||||
return $this->gridCol;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array|null $gridCol
|
|
||||||
*/
|
|
||||||
public function setGridCol($gridCol): void
|
|
||||||
{
|
|
||||||
$this->gridCol = $gridCol;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,364 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* This file is part of the SplendidBear Websites' projects.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2019 @ www.splendidbear.org
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Entity;
|
|
||||||
|
|
||||||
use App\Application\Sonata\UserBundle\Entity\User;
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class PlayedGame
|
|
||||||
*
|
|
||||||
* @package App\Entity
|
|
||||||
* @author system7 <https://www.splendidbear.org>
|
|
||||||
*
|
|
||||||
* @ORM\Entity(repositoryClass="App\Repository\PlayedGameRepository")
|
|
||||||
*/
|
|
||||||
class PlayedGame
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @ORM\Id()
|
|
||||||
* @ORM\GeneratedValue()
|
|
||||||
* @ORM\Column(type="integer")
|
|
||||||
*/
|
|
||||||
private $id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="game_assoc", type="string", length=50, nullable=false)
|
|
||||||
*/
|
|
||||||
private $gameAssoc;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Grid|null
|
|
||||||
*
|
|
||||||
* @ORM\OneToOne(targetEntity="App\Entity\Grid", mappedBy="playedGame", cascade={"persist"})
|
|
||||||
*/
|
|
||||||
private $grid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var User|null
|
|
||||||
*
|
|
||||||
* @ORM\ManyToOne(targetEntity="App\Application\Sonata\UserBundle\Entity\User")
|
|
||||||
* @ORM\JoinColumn(name="red_id", referencedColumnName="id", nullable=true)
|
|
||||||
*/
|
|
||||||
private $red;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Gamer|null
|
|
||||||
*
|
|
||||||
* @ORM\ManyToOne(targetEntity="App\Entity\Gamer")
|
|
||||||
* @ORM\JoinColumn(name="red_anon", referencedColumnName="id", nullable=true)
|
|
||||||
*/
|
|
||||||
private $redAnon;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var User|null
|
|
||||||
*
|
|
||||||
* @ORM\ManyToOne(targetEntity="App\Application\Sonata\UserBundle\Entity\User")
|
|
||||||
* @ORM\JoinColumn(name="blue_id", referencedColumnName="id", nullable=true)
|
|
||||||
*/
|
|
||||||
private $blue;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Gamer|null
|
|
||||||
*
|
|
||||||
* @ORM\ManyToOne(targetEntity="App\Entity\Gamer")
|
|
||||||
* @ORM\JoinColumn(name="blue_anon", referencedColumnName="id", nullable=true)
|
|
||||||
*/
|
|
||||||
private $blueAnon;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var int|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="red_points", type="integer", length=5, nullable=true)
|
|
||||||
*/
|
|
||||||
private $redPoints;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var int|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="blue_points", type="integer", length=5, nullable=true)
|
|
||||||
*/
|
|
||||||
private $bluePoints;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var boolean|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="red_exploded_bomb", type="boolean", nullable=true)
|
|
||||||
*/
|
|
||||||
private $redExplodedBomb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var boolean|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="blue_exploded_bomb", type="boolean", nullable=true)
|
|
||||||
*/
|
|
||||||
private $blueExplodedBomb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="resign", type="string", length=7, nullable=true)
|
|
||||||
*/
|
|
||||||
private $resign;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var \DateTime|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="created", type="datetime", nullable=true)
|
|
||||||
*/
|
|
||||||
private $created;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var \DateTime|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="updated", type="datetime", nullable=true)
|
|
||||||
*/
|
|
||||||
private $updated;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Step|null
|
|
||||||
*
|
|
||||||
* @ORM\OneToMany(targetEntity="App\Entity\Step", mappedBy="playedGame")
|
|
||||||
* @ORM\JoinColumn(name="step", referencedColumnName="id", nullable=true)
|
|
||||||
*/
|
|
||||||
private $step;
|
|
||||||
|
|
||||||
public function getId(): ?int
|
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string|null
|
|
||||||
*/
|
|
||||||
public function getGameAssoc(): ?string
|
|
||||||
{
|
|
||||||
return $this->gameAssoc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string|null $gameAssoc
|
|
||||||
*/
|
|
||||||
public function setGameAssoc(?string $gameAssoc): void
|
|
||||||
{
|
|
||||||
$this->gameAssoc = $gameAssoc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Grid|null
|
|
||||||
*/
|
|
||||||
public function getGrid()
|
|
||||||
{
|
|
||||||
return $this->grid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Grid|null $grid
|
|
||||||
*/
|
|
||||||
public function setGrid( $grid): void
|
|
||||||
{
|
|
||||||
$this->grid = $grid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return User|null
|
|
||||||
*/
|
|
||||||
public function getRed()
|
|
||||||
{
|
|
||||||
return $this->red;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param User|null $red
|
|
||||||
*/
|
|
||||||
public function setRed( $red): void
|
|
||||||
{
|
|
||||||
$this->red = $red;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Gamer|null
|
|
||||||
*/
|
|
||||||
public function getRedAnon()
|
|
||||||
{
|
|
||||||
return $this->redAnon;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Gamer|null $redAnon
|
|
||||||
*/
|
|
||||||
public function setRedAnon( $redAnon): void
|
|
||||||
{
|
|
||||||
$this->redAnon = $redAnon;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return User|null
|
|
||||||
*/
|
|
||||||
public function getBlue()
|
|
||||||
{
|
|
||||||
return $this->blue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param User|null $blue
|
|
||||||
*/
|
|
||||||
public function setBlue( $blue): void
|
|
||||||
{
|
|
||||||
$this->blue = $blue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Gamer|null
|
|
||||||
*/
|
|
||||||
public function getBlueAnon()
|
|
||||||
{
|
|
||||||
return $this->blueAnon;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Gamer|null $blueAnon
|
|
||||||
*/
|
|
||||||
public function setBlueAnon( $blueAnon): void
|
|
||||||
{
|
|
||||||
$this->blueAnon = $blueAnon;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return int|null
|
|
||||||
*/
|
|
||||||
public function getRedPoints(): ?int
|
|
||||||
{
|
|
||||||
return $this->redPoints;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param int|null $redPoints
|
|
||||||
*/
|
|
||||||
public function setRedPoints(?int $redPoints): void
|
|
||||||
{
|
|
||||||
$this->redPoints = $redPoints;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return int|null
|
|
||||||
*/
|
|
||||||
public function getBluePoints(): ?int
|
|
||||||
{
|
|
||||||
return $this->bluePoints;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param int|null $bluePoints
|
|
||||||
*/
|
|
||||||
public function setBluePoints(?int $bluePoints): void
|
|
||||||
{
|
|
||||||
$this->bluePoints = $bluePoints;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public function getRedExplodedBomb(): ?bool
|
|
||||||
{
|
|
||||||
return $this->redExplodedBomb;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param bool|null $redExplodedBomb
|
|
||||||
*/
|
|
||||||
public function setRedExplodedBomb(?bool $redExplodedBomb): void
|
|
||||||
{
|
|
||||||
$this->redExplodedBomb = $redExplodedBomb;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public function getBlueExplodedBomb(): ?bool
|
|
||||||
{
|
|
||||||
return $this->blueExplodedBomb;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param bool|null $blueExplodedBomb
|
|
||||||
*/
|
|
||||||
public function setBlueExplodedBomb(?bool $blueExplodedBomb): void
|
|
||||||
{
|
|
||||||
$this->blueExplodedBomb = $blueExplodedBomb;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string|null
|
|
||||||
*/
|
|
||||||
public function getResign(): ?string
|
|
||||||
{
|
|
||||||
return $this->resign;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string|null $resign
|
|
||||||
*/
|
|
||||||
public function setResign(?string $resign): void
|
|
||||||
{
|
|
||||||
$this->resign = $resign;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \DateTime|null
|
|
||||||
*/
|
|
||||||
public function getCreated(): ?\DateTime
|
|
||||||
{
|
|
||||||
return $this->created;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime|null $created
|
|
||||||
*/
|
|
||||||
public function setCreated(?\DateTime $created): void
|
|
||||||
{
|
|
||||||
$this->created = $created;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \DateTime|null
|
|
||||||
*/
|
|
||||||
public function getUpdated(): ?\DateTime
|
|
||||||
{
|
|
||||||
return $this->updated;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime|null $updated
|
|
||||||
*/
|
|
||||||
public function setUpdated(?\DateTime $updated): void
|
|
||||||
{
|
|
||||||
$this->updated = $updated;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Step|null
|
|
||||||
*/
|
|
||||||
public function getStep()
|
|
||||||
{
|
|
||||||
return $this->step;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Step|null $step
|
|
||||||
*/
|
|
||||||
public function setStep( $step): void
|
|
||||||
{
|
|
||||||
$this->step = $step;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,151 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* This file is part of the SplendidBear Websites' projects.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2019 @ www.splendidbear.org
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Entity;
|
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class Step
|
|
||||||
*
|
|
||||||
* @package App\Entity
|
|
||||||
* @author system7 <https://www.splendidbear.org>
|
|
||||||
*
|
|
||||||
* @ORM\Entity(repositoryClass="App\Repository\StepRepository")
|
|
||||||
*/
|
|
||||||
class Step
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @ORM\Id()
|
|
||||||
* @ORM\GeneratedValue()
|
|
||||||
* @ORM\Column(type="integer")
|
|
||||||
*/
|
|
||||||
private $id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var int|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="row", length=3, type="integer", nullable=false)
|
|
||||||
*/
|
|
||||||
private $row;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var int|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="col", length=3, type="integer", nullable=false)
|
|
||||||
*/
|
|
||||||
private $col;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var boolean|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="wbomb", type="boolean", nullable=true)
|
|
||||||
*/
|
|
||||||
private $wBomb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var PlayedGame|null
|
|
||||||
*
|
|
||||||
* @ORM\ManyToOne(targetEntity="App\Entity\PlayedGame", inversedBy="step")
|
|
||||||
*/
|
|
||||||
private $playedGame;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var \DateTime|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="created", type="datetime", nullable=true)
|
|
||||||
*/
|
|
||||||
private $created;
|
|
||||||
|
|
||||||
public function getId(): ?int
|
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return int|null
|
|
||||||
*/
|
|
||||||
public function getRow(): ?int
|
|
||||||
{
|
|
||||||
return $this->row;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param int|null $row
|
|
||||||
*/
|
|
||||||
public function setRow(?int $row): void
|
|
||||||
{
|
|
||||||
$this->row = $row;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return int|null
|
|
||||||
*/
|
|
||||||
public function getCol(): ?int
|
|
||||||
{
|
|
||||||
return $this->col;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param int|null $col
|
|
||||||
*/
|
|
||||||
public function setCol(?int $col): void
|
|
||||||
{
|
|
||||||
$this->col = $col;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool|null
|
|
||||||
*/
|
|
||||||
public function getWBomb(): ?bool
|
|
||||||
{
|
|
||||||
return $this->wBomb;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param bool|null $wBomb
|
|
||||||
*/
|
|
||||||
public function setWBomb(?bool $wBomb): void
|
|
||||||
{
|
|
||||||
$this->wBomb = $wBomb;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return PlayedGame|null
|
|
||||||
*/
|
|
||||||
public function getPlayedGame(): ?PlayedGame
|
|
||||||
{
|
|
||||||
return $this->playedGame;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param PlayedGame|null $playedGame
|
|
||||||
*/
|
|
||||||
public function setPlayedGame(?PlayedGame $playedGame): void
|
|
||||||
{
|
|
||||||
$this->playedGame = $playedGame;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \DateTime|null
|
|
||||||
*/
|
|
||||||
public function getCreated(): ?\DateTime
|
|
||||||
{
|
|
||||||
return $this->created;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime|null $created
|
|
||||||
*/
|
|
||||||
public function setCreated(?\DateTime $created): void
|
|
||||||
{
|
|
||||||
$this->created = $created;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Jotunheimr\AdminBundle\Controller;
|
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
|
|
||||||
|
class DashboardController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @return \Symfony\Component\HttpFoundation\Response
|
||||||
|
*/
|
||||||
|
public function indexAction()
|
||||||
|
{
|
||||||
|
return $this->render('JotunheimrAdminBundle:Dashboard:index.html.twig', array());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Jotunheimr\AdminBundle;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||||
|
|
||||||
|
class JotunheimrAdminBundle extends Bundle
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
imports:
|
||||||
|
- { resource: "@JotunheimrAdminBundle/Resources/config/services.yml" }
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
jotun.version: 3.0.0
|
||||||
|
admin.item_per_page: 10
|
||||||
|
|
||||||
|
twig:
|
||||||
|
globals:
|
||||||
|
jotun_version: '%jotun.version%'
|
||||||
|
project_name: 'MineSeeker'
|
||||||
|
project_shortname: 'Mine'
|
||||||
|
project_monogram: 'MS'
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
JotunheimrAdminBundle_homepage:
|
||||||
|
path: /admin
|
||||||
|
defaults: { _controller: JotunheimrAdminBundle:Dashboard:index }
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
services:
|
||||||
|
app.jotun_service:
|
||||||
|
class: Jotunheimr\AdminBundle\Controller\JotunServiceController
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,176 @@
|
|||||||
|
/*
|
||||||
|
* Skin: Black
|
||||||
|
* -----------
|
||||||
|
*/
|
||||||
|
/* skin-black navbar */
|
||||||
|
.skin-black-light .main-header {
|
||||||
|
-webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
.skin-black-light .main-header .navbar-toggle {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.skin-black-light .main-header .navbar-brand {
|
||||||
|
color: #333;
|
||||||
|
border-right: 1px solid #eee;
|
||||||
|
}
|
||||||
|
.skin-black-light .main-header > .navbar {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.skin-black-light .main-header > .navbar .nav > li > a {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.skin-black-light .main-header > .navbar .nav > li > a:hover,
|
||||||
|
.skin-black-light .main-header > .navbar .nav > li > a:active,
|
||||||
|
.skin-black-light .main-header > .navbar .nav > li > a:focus,
|
||||||
|
.skin-black-light .main-header > .navbar .nav .open > a,
|
||||||
|
.skin-black-light .main-header > .navbar .nav .open > a:hover,
|
||||||
|
.skin-black-light .main-header > .navbar .nav .open > a:focus,
|
||||||
|
.skin-black-light .main-header > .navbar .nav > .active > a {
|
||||||
|
background: #ffffff;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.skin-black-light .main-header > .navbar .sidebar-toggle {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.skin-black-light .main-header > .navbar .sidebar-toggle:hover {
|
||||||
|
color: #999999;
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
.skin-black-light .main-header > .navbar > .sidebar-toggle {
|
||||||
|
color: #333;
|
||||||
|
border-right: 1px solid #eee;
|
||||||
|
}
|
||||||
|
.skin-black-light .main-header > .navbar .navbar-nav > li > a {
|
||||||
|
border-right: 1px solid #eee;
|
||||||
|
}
|
||||||
|
.skin-black-light .main-header > .navbar .navbar-custom-menu .navbar-nav > li > a,
|
||||||
|
.skin-black-light .main-header > .navbar .navbar-right > li > a {
|
||||||
|
border-left: 1px solid #eee;
|
||||||
|
border-right-width: 0;
|
||||||
|
}
|
||||||
|
.skin-black-light .main-header > .logo {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #333333;
|
||||||
|
border-bottom: 0 solid transparent;
|
||||||
|
border-right: 1px solid #eee;
|
||||||
|
}
|
||||||
|
.skin-black-light .main-header > .logo:hover {
|
||||||
|
background-color: #fcfcfc;
|
||||||
|
}
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.skin-black-light .main-header > .logo {
|
||||||
|
background-color: #222222;
|
||||||
|
color: #ffffff;
|
||||||
|
border-bottom: 0 solid transparent;
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
.skin-black-light .main-header > .logo:hover {
|
||||||
|
background-color: #1f1f1f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.skin-black-light .main-header li.user-header {
|
||||||
|
background-color: #222;
|
||||||
|
}
|
||||||
|
.skin-black-light .content-header {
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.skin-black-light .wrapper,
|
||||||
|
.skin-black-light .main-sidebar,
|
||||||
|
.skin-black-light .left-side {
|
||||||
|
background-color: #f9fafc;
|
||||||
|
}
|
||||||
|
.skin-black-light .content-wrapper,
|
||||||
|
.skin-black-light .main-footer {
|
||||||
|
border-left: 1px solid #d2d6de;
|
||||||
|
}
|
||||||
|
.skin-black-light .user-panel > .info,
|
||||||
|
.skin-black-light .user-panel > .info > a {
|
||||||
|
color: #444444;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar-menu > li {
|
||||||
|
-webkit-transition: border-left-color 0.3s ease;
|
||||||
|
-o-transition: border-left-color 0.3s ease;
|
||||||
|
transition: border-left-color 0.3s ease;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar-menu > li.header {
|
||||||
|
color: #848484;
|
||||||
|
background: #f9fafc;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar-menu > li > a {
|
||||||
|
border-left: 3px solid transparent;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar-menu > li:hover > a,
|
||||||
|
.skin-black-light .sidebar-menu > li.active > a {
|
||||||
|
color: #000000;
|
||||||
|
background: #f4f4f5;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar-menu > li.active {
|
||||||
|
border-left-color: #ffffff;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar-menu > li.active > a {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar-menu > li > .treeview-menu {
|
||||||
|
background: #f4f4f5;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar a {
|
||||||
|
color: #444444;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.skin-black-light .treeview-menu > li > a {
|
||||||
|
color: #777777;
|
||||||
|
}
|
||||||
|
.skin-black-light .treeview-menu > li.active > a,
|
||||||
|
.skin-black-light .treeview-menu > li > a:hover {
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
.skin-black-light .treeview-menu > li.active > a {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar-form {
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 1px solid #d2d6de;
|
||||||
|
margin: 10px 10px;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar-form input[type="text"],
|
||||||
|
.skin-black-light .sidebar-form .btn {
|
||||||
|
box-shadow: none;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
height: 35px;
|
||||||
|
-webkit-transition: all 0.3s ease-in-out;
|
||||||
|
-o-transition: all 0.3s ease-in-out;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar-form input[type="text"] {
|
||||||
|
color: #666;
|
||||||
|
border-top-left-radius: 2px;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
border-bottom-left-radius: 2px;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar-form input[type="text"]:focus,
|
||||||
|
.skin-black-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||||
|
background-color: #fff;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||||
|
border-left-color: #fff;
|
||||||
|
}
|
||||||
|
.skin-black-light .sidebar-form .btn {
|
||||||
|
color: #999;
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-top-right-radius: 2px;
|
||||||
|
border-bottom-right-radius: 2px;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.skin-black-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu {
|
||||||
|
border-left: 1px solid #d2d6de;
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
.skin-black-light .main-header{-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.skin-black-light .main-header .navbar-toggle{color:#333}.skin-black-light .main-header .navbar-brand{color:#333;border-right:1px solid #eee}.skin-black-light .main-header>.navbar{background-color:#fff}.skin-black-light .main-header>.navbar .nav>li>a{color:#333}.skin-black-light .main-header>.navbar .nav>li>a:hover,.skin-black-light .main-header>.navbar .nav>li>a:active,.skin-black-light .main-header>.navbar .nav>li>a:focus,.skin-black-light .main-header>.navbar .nav .open>a,.skin-black-light .main-header>.navbar .nav .open>a:hover,.skin-black-light .main-header>.navbar .nav .open>a:focus,.skin-black-light .main-header>.navbar .nav>.active>a{background:#fff;color:#999}.skin-black-light .main-header>.navbar .sidebar-toggle{color:#333}.skin-black-light .main-header>.navbar .sidebar-toggle:hover{color:#999;background:#fff}.skin-black-light .main-header>.navbar>.sidebar-toggle{color:#333;border-right:1px solid #eee}.skin-black-light .main-header>.navbar .navbar-nav>li>a{border-right:1px solid #eee}.skin-black-light .main-header>.navbar .navbar-custom-menu .navbar-nav>li>a,.skin-black-light .main-header>.navbar .navbar-right>li>a{border-left:1px solid #eee;border-right-width:0}.skin-black-light .main-header>.logo{background-color:#fff;color:#333;border-bottom:0 solid transparent;border-right:1px solid #eee}.skin-black-light .main-header>.logo:hover{background-color:#fcfcfc}@media (max-width:767px){.skin-black-light .main-header>.logo{background-color:#222;color:#fff;border-bottom:0 solid transparent;border-right:none}.skin-black-light .main-header>.logo:hover{background-color:#1f1f1f}}.skin-black-light .main-header li.user-header{background-color:#222}.skin-black-light .content-header{background:transparent;box-shadow:none}.skin-black-light .wrapper,.skin-black-light .main-sidebar,.skin-black-light .left-side{background-color:#f9fafc}.skin-black-light .content-wrapper,.skin-black-light .main-footer{border-left:1px solid #d2d6de}.skin-black-light .user-panel>.info,.skin-black-light .user-panel>.info>a{color:#444}.skin-black-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-black-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-black-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-black-light .sidebar-menu>li:hover>a,.skin-black-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-black-light .sidebar-menu>li.active{border-left-color:#fff}.skin-black-light .sidebar-menu>li.active>a{font-weight:600}.skin-black-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-black-light .sidebar a{color:#444}.skin-black-light .sidebar a:hover{text-decoration:none}.skin-black-light .treeview-menu>li>a{color:#777}.skin-black-light .treeview-menu>li.active>a,.skin-black-light .treeview-menu>li>a:hover{color:#000}.skin-black-light .treeview-menu>li.active>a{font-weight:600}.skin-black-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-black-light .sidebar-form input[type="text"],.skin-black-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.skin-black-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-black-light .sidebar-form input[type="text"]:focus,.skin-black-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-black-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-black-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-black-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}
|
||||||
@@ -0,0 +1,154 @@
|
|||||||
|
/*
|
||||||
|
* Skin: Black
|
||||||
|
* -----------
|
||||||
|
*/
|
||||||
|
/* skin-black navbar */
|
||||||
|
.skin-black .main-header {
|
||||||
|
-webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
.skin-black .main-header .navbar-toggle {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.skin-black .main-header .navbar-brand {
|
||||||
|
color: #333;
|
||||||
|
border-right: 1px solid #eee;
|
||||||
|
}
|
||||||
|
.skin-black .main-header > .navbar {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.skin-black .main-header > .navbar .nav > li > a {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.skin-black .main-header > .navbar .nav > li > a:hover,
|
||||||
|
.skin-black .main-header > .navbar .nav > li > a:active,
|
||||||
|
.skin-black .main-header > .navbar .nav > li > a:focus,
|
||||||
|
.skin-black .main-header > .navbar .nav .open > a,
|
||||||
|
.skin-black .main-header > .navbar .nav .open > a:hover,
|
||||||
|
.skin-black .main-header > .navbar .nav .open > a:focus,
|
||||||
|
.skin-black .main-header > .navbar .nav > .active > a {
|
||||||
|
background: #ffffff;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.skin-black .main-header > .navbar .sidebar-toggle {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.skin-black .main-header > .navbar .sidebar-toggle:hover {
|
||||||
|
color: #999999;
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
.skin-black .main-header > .navbar > .sidebar-toggle {
|
||||||
|
color: #333;
|
||||||
|
border-right: 1px solid #eee;
|
||||||
|
}
|
||||||
|
.skin-black .main-header > .navbar .navbar-nav > li > a {
|
||||||
|
border-right: 1px solid #eee;
|
||||||
|
}
|
||||||
|
.skin-black .main-header > .navbar .navbar-custom-menu .navbar-nav > li > a,
|
||||||
|
.skin-black .main-header > .navbar .navbar-right > li > a {
|
||||||
|
border-left: 1px solid #eee;
|
||||||
|
border-right-width: 0;
|
||||||
|
}
|
||||||
|
.skin-black .main-header > .logo {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #333333;
|
||||||
|
border-bottom: 0 solid transparent;
|
||||||
|
border-right: 1px solid #eee;
|
||||||
|
}
|
||||||
|
.skin-black .main-header > .logo:hover {
|
||||||
|
background-color: #fcfcfc;
|
||||||
|
}
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.skin-black .main-header > .logo {
|
||||||
|
background-color: #222222;
|
||||||
|
color: #ffffff;
|
||||||
|
border-bottom: 0 solid transparent;
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
.skin-black .main-header > .logo:hover {
|
||||||
|
background-color: #1f1f1f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.skin-black .main-header li.user-header {
|
||||||
|
background-color: #222;
|
||||||
|
}
|
||||||
|
.skin-black .content-header {
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.skin-black .wrapper,
|
||||||
|
.skin-black .main-sidebar,
|
||||||
|
.skin-black .left-side {
|
||||||
|
background-color: #222d32;
|
||||||
|
}
|
||||||
|
.skin-black .user-panel > .info,
|
||||||
|
.skin-black .user-panel > .info > a {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.skin-black .sidebar-menu > li.header {
|
||||||
|
color: #4b646f;
|
||||||
|
background: #1a2226;
|
||||||
|
}
|
||||||
|
.skin-black .sidebar-menu > li > a {
|
||||||
|
border-left: 3px solid transparent;
|
||||||
|
}
|
||||||
|
.skin-black .sidebar-menu > li:hover > a,
|
||||||
|
.skin-black .sidebar-menu > li.active > a {
|
||||||
|
color: #ffffff;
|
||||||
|
background: #1e282c;
|
||||||
|
border-left-color: #ffffff;
|
||||||
|
}
|
||||||
|
.skin-black .sidebar-menu > li > .treeview-menu {
|
||||||
|
margin: 0 1px;
|
||||||
|
background: #2c3b41;
|
||||||
|
}
|
||||||
|
.skin-black .sidebar a {
|
||||||
|
color: #b8c7ce;
|
||||||
|
}
|
||||||
|
.skin-black .sidebar a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.skin-black .treeview-menu > li > a {
|
||||||
|
color: #8aa4af;
|
||||||
|
}
|
||||||
|
.skin-black .treeview-menu > li.active > a,
|
||||||
|
.skin-black .treeview-menu > li > a:hover {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
.skin-black .sidebar-form {
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 1px solid #374850;
|
||||||
|
margin: 10px 10px;
|
||||||
|
}
|
||||||
|
.skin-black .sidebar-form input[type="text"],
|
||||||
|
.skin-black .sidebar-form .btn {
|
||||||
|
box-shadow: none;
|
||||||
|
background-color: #374850;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
height: 35px;
|
||||||
|
-webkit-transition: all 0.3s ease-in-out;
|
||||||
|
-o-transition: all 0.3s ease-in-out;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
.skin-black .sidebar-form input[type="text"] {
|
||||||
|
color: #666;
|
||||||
|
border-top-left-radius: 2px;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
border-bottom-left-radius: 2px;
|
||||||
|
}
|
||||||
|
.skin-black .sidebar-form input[type="text"]:focus,
|
||||||
|
.skin-black .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||||
|
background-color: #fff;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
.skin-black .sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||||
|
border-left-color: #fff;
|
||||||
|
}
|
||||||
|
.skin-black .sidebar-form .btn {
|
||||||
|
color: #999;
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-top-right-radius: 2px;
|
||||||
|
border-bottom-right-radius: 2px;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user