from naja.constants import BOARD_SIZE, TILE_SIZE, KEYS, ACT
from naja.events import finish_event
+from naja.sound import sound
from naja.widgets.base import Widget
from naja.widgets.tile import TileWidget
self.card_pos = card_pos
self.info.set_position(self.card_pos)
self.legal = self.card_pos in self.state.player.legal_moves()
+ sound.play_sound('zoop.ogg', volume=0.05)
def change_pos(self, offset):
tpos = (offset[0] + self.card_pos[0], offset[1] + self.card_pos[1])
if self.state.player.set_position(self.card_pos):
self.state.gameboard.change_mode(ACT)
self.info.set_position(self.card_pos)
+ sound.play_sound('chirp.ogg', volume=0.5)
return finish_event()
return super(BoardWidget, self).handle_event(ev)