-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayer.py
43 lines (39 loc) · 989 Bytes
/
player.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# -*- coding: utf-8 -*-
"""
Created on Sat May 18 22:34:32 2019
@author: jed12
"""
import objects
from NeuralNet import network
xspeed = 5
class Player():
def __init__(self):
self.net = network.Network()
self.net.fresh_start()
self.net.mutate()
self.score = 0
self.jumping = False
self.fallen = False
self.x_pos = objects.x_init
self.y_pos = objects.player_floor_1
self.x_vel = xspeed
self.y_vel = 0
self.angle = 0
self.win = False
self.dead = False
self.image = 4
self.crashes = 0
class Human():
def __init__(self):
self.score = 0
self.jumping = False
self.fallen = False
self.x_pos = objects.x_init
self.y_pos = objects.player_floor_1
self.x_vel = xspeed
self.y_vel = 0
self.angle = 0
self.win = False
self.dead = False
self.image = 0
self.crashes = 0