-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTraining.py
More file actions
29 lines (24 loc) · 707 Bytes
/
Training.py
File metadata and controls
29 lines (24 loc) · 707 Bytes
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
import random
import pygame
black = 0, 0, 0
class Point:
point = None
x = None
y = None
label = None
surface = None
def __init__(self, width, height, surface):
self.x = random.randrange(width)
self.y = random.randrange(height)
self.surface = surface
if (self.x > self.y):
self.label = 1
else:
self.label = -1
def show(self):
if (self.label == 1):
self.point = pygame.draw.circle(self.surface, black, [
self.x, self.y], 10, 2)
else:
self.point = pygame.draw.circle(self.surface, black, [
self.x, self.y], 10)