2021-03-11 00:47:14 +01:00
|
|
|
import pygame
|
2021-03-14 11:32:44 +01:00
|
|
|
import minefield as mf
|
|
|
|
import project_constants as pc
|
|
|
|
import main as mai
|
2021-03-11 00:47:14 +01:00
|
|
|
|
|
|
|
def interpret( event ):
|
|
|
|
|
|
|
|
# remove this after adding code
|
|
|
|
pass
|
|
|
|
|
|
|
|
# key press interpretation here
|
|
|
|
# add calls to sapper object's movement functions
|
|
|
|
# TODO : key press interpretation goes here
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# TINY SAMPLE FROM MY PYGAME TEST
|
|
|
|
# (had trouble with figuring this out)
|
|
|
|
#
|
|
|
|
# # this part is true, when you press a key down
|
|
|
|
# # there's also a KEYUP for letting go
|
2021-03-14 11:32:44 +01:00
|
|
|
#if event.type == pygame.KEYDOWN:
|
2021-03-11 00:47:14 +01:00
|
|
|
#
|
|
|
|
# # this part is true, when a key u pressed down is the left arrow
|
2021-03-14 11:32:44 +01:00
|
|
|
#if event.key == pygame.K_RIGHT:
|
|
|
|
# mf.sapper_position[0] += 10
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-11 00:47:14 +01:00
|
|
|
#
|