Skip to content
Snippets Groups Projects
Commit db4b5e56 authored by Leonhard Strohmidel's avatar Leonhard Strohmidel
Browse files

+Socketwrapper, +Model on client side

parent a10aaf13
No related branches found
No related tags found
No related merge requests found
from flask_socketio import SocketIO
class Socket:
def __init__(self, app)
self.socket = SocketIO(app)
def init_team(self, team, side):
team_dict = {
}
\ No newline at end of file
......@@ -3,8 +3,8 @@
<head>
<title>CFD Frontend</title>
<meta name="viewport" content="width = device-width, initial-scale = 1">
<link type="text/css" rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css">
<!--<link type="text/css" rel="stylesheet" href="frontend.css"/>-->
<link type="text/css" rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css"/>
<link type="text/css" rel="stylesheet" href="../../static/styles/frontend.css"/>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.8/socket.io.min.js"></script>
<script>
......@@ -86,98 +86,6 @@
});
</script>
<style>
@font-face { font-family: PressStart2P; src: url('../../static/PressStart2P-Regular.ttf'); }
body{
font-family: PressStart2P;
}
#player_select{
display: none;
}
#final_screen{
display: none;
}
#oponents{
display: none;
}
h1, h2, h3, h4, h5 .h1, .h2, .h3, .h4, .h5{
font-family: PressStart2P;
}
.defult_row{
height: 33px;
}
.answer_row{
height: 298px;
}
.team_row{
height: 200px;
}
.answer_bg{
height: 50px;
font-size: 20px;
}
.fails{
height: 37px;
color: #c83200;
font-size: 34px;
font-family: PressStart2P;
margin-bottom: 7px;
}
.largest{
font-size: 150px;
}
.xxl{
font-size: 50px;
}
.xl{
font-size: 42px;
}
.l{
font-size: 34px;
}
.ccc-blue{
color: #0084b0;
}
.ccc-green{
color: #00a356;
}
.bg-black{
background-color: black !important;
}
.bg-grey{
background-color: #1e1e3c;
}
.table td{
border: none;
}
.vertical-center {
min-height: 100%; /* Fallback for browsers do NOT support vh unit */
min-height: 100vh; /* These two lines are counted as one :-) */
display: flex;
align-items: center;
}
</style>
</head>
<body class="bg-black text-light vertical-center">
......
......@@ -30,6 +30,42 @@ class Team{
}
}
class Answer{
constructor (){
this.points = 0;
this.hidden = True;
this.modifier = 1;
this.answer = "";
this.uuid = "";
}
}
class Question{
constructor(){
this.uuid = "";
this.question = "";
this.answers = [];
}
}
class Game{
constructor (){
this.name = "";
this.team_left = null;
this.team_right = null;
this.points_left = 0;
this.ponts_right = 0;
this.round = null;
}
}
class Round{
constructor (){
this.points = 0;
this.
}
}
var socket = io.connect("ws://localhost:5000");
var team_left;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment