From 702c5b9ae3a533aa6cfda6f2fbf66a6962e39188 Mon Sep 17 00:00:00 2001 From: Marc Partensky Date: Thu, 13 Aug 2020 01:25:37 +0200 Subject: [PATCH] flask test --- .DS_Store | Bin 8196 -> 10244 bytes Flask/Test/main.py | 12 ++++++++ Pong/main.py | 75 --------------------------------------------- Pong/pong.kv | 50 ------------------------------ 4 files changed, 12 insertions(+), 125 deletions(-) create mode 100755 Flask/Test/main.py delete mode 100644 Pong/main.py delete mode 100644 Pong/pong.kv diff --git a/.DS_Store b/.DS_Store index d77988b077bb75fa82f09e1d0f3ed07b425e4a1c..e583632413d91a6acca002de22edfcb9c5a3fddf 100644 GIT binary patch delta 165 zcmZp1XbF&DU|?W$DortDU{GLSVBlbY&;mRY3&ketDKd&|4A{-jD6*MHK!BN(g&}|; zpCOMSeX^nOO7VCH1`y!n;EWfLsIIm!Hq}uuv^1amQP>5cax<^+FP4oBx7h@lL5dj| t6u21}7+e_`1b8+UerKM{FB2%j1hH2Gq=1ou!2m>0E|BTnd`Fm>834t-9w7h# delta 97 zcmZn(XmOBWU|?W$DortDU;r^W7$CF&_ryZ6iF%5RLK_2i^D_!<<`EEJ-s~vynnjSA p0SqL#85kH`85jh(Hx_ self.top): - self.ball.velocity_y *= -1 - - # went of to a side to score point? - if self.ball.x < self.x: - self.player2.score += 1 - self.serve_ball(vel=(4, 0)) - if self.ball.x > self.width: - self.player1.score += 1 - self.serve_ball(vel=(-4, 0)) - - def on_touch_move(self, touch): - if touch.x < self.width / 3: - self.player1.center_y = touch.y - if touch.x > self.width - self.width / 3: - self.player2.center_y = touch.y - - -class PongApp(App): - def build(self): - game = PongGame() - game.serve_ball() - Clock.schedule_interval(game.update, 1.0 / 60.0) - return game - - -if __name__ == '__main__': - PongApp().run() diff --git a/Pong/pong.kv b/Pong/pong.kv deleted file mode 100644 index c547fb0..0000000 --- a/Pong/pong.kv +++ /dev/null @@ -1,50 +0,0 @@ - -: - size: 50, 50 - canvas: - Ellipse: - pos: self.pos - size: self.size - -: - size: 25, 200 - canvas: - Rectangle: - pos:self.pos - size:self.size - -: - ball: pong_ball - player1: player_left - player2: player_right - - canvas: - Rectangle: - pos: self.center_x - 5, 0 - size: 10, self.height - - Label: - font_size: 70 - center_x: root.width / 4 - top: root.top - 50 - text: str(root.player1.score) - - Label: - font_size: 70 - center_x: root.width * 3 / 4 - top: root.top - 50 - text: str(root.player2.score) - - PongBall: - id: pong_ball - center: self.parent.center - - PongPaddle: - id: player_left - x: root.x - center_y: root.center_y - - PongPaddle: - id: player_right - x: root.width - self.width - center_y: root.center_y