I'm making a pygame game, and whenever I run my code I get the error expected ':'
. I am aware that using [
and ]
in match/case blocks is used for something else, but how do I get around this issue?
case pygame.KEYDOWN:
match event.key:
case game.controls["pan_up"]:
world_pos[1] -= 1
case game.controls["pan_left"]:
world_pos[0] -= 1
case game.controls["pan_down"]:
world_pos[1] += 1
case game.controls["pan_right"]:
world_pos[0] += 1