Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardottt committed Jun 15, 2019
1 parent 3670279 commit 2f574d4
Show file tree
Hide file tree
Showing 49 changed files with 16,201 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Bomb.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 17 17:05:14 2019
@author: edoardottt
"""

class Bomb:
x_m = 0
y_m = 0
def __init__(self, x_m, y_m):
self.x_m = x_m
self.y_m = y_m
def paintBomb(self,x,y,image,screen):
screen.blit(image,(x,y))
def __del__(self):
self.x_m= -400
self.y_m = -400
23 changes: 23 additions & 0 deletions Enemy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 17 15:35:46 2019
@author: edoardottt
"""
import random

class Enemy:
x_n = 0
y_n = 0
destra = False
def __init__(self, x_n, y_n):
self.x_n = x_n
self.y_n = y_n
intero = random.randint(0,1)
if (intero):
self.destra = True
def paintNemico(self,x,y,image,screen):
screen.blit(image,(x,y))
def __del__(self):
self.x_n = -400
self.y_n = -400
18 changes: 18 additions & 0 deletions Missile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 17 15:38:47 2019
@author: edoardott
"""

class Missile:
x_m = 0
y_m = 0
def __init__(self, x_m, y_m):
self.x_m = x_m
self.y_m = y_m
def paintMissile(self,x,y,image,screen):
screen.blit(image,(x,y))
def __del__(self):
self.x_m = -400
self.y_m = -400
Binary file added __pycache__/Bomb.cpython-37.pyc
Binary file not shown.
Binary file added __pycache__/Enemy.cpython-37.pyc
Binary file not shown.
Binary file added __pycache__/Missile.cpython-37.pyc
Binary file not shown.
Binary file added __pycache__/game.cpython-37.pyc
Binary file not shown.
Binary file added __pycache__/results.cpython-37.pyc
Binary file not shown.
23 changes: 23 additions & 0 deletions analyzeresults.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 18 12:38:48 2019
@author: edoardott
"""

import sqlite3


conn = sqlite3.connect('result.db')

c = conn.cursor()

c.execute("SELECT nemici FROM match")
print(c.fetchall())
c.execute("SELECT MAX(missili) FROM match")
print("RECORD MISSILI: "+str(c.fetchone()))

c.execute("SELECT MAX(nemici) FROM match")
print("RECORD NEMICI: "+str(c.fetchone()))

conn.close()
Binary file added bomb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2f574d4

Please sign in to comment.