mirror of
https://github.com/a2-4am/wozardry.git
synced 2024-12-04 11:49:55 +00:00
Merge pull request #5 from KrisKennaway/master
Fix rewind() with bit_count > 1
This commit is contained in:
commit
03e7bdc116
@ -182,8 +182,8 @@ class Track(RawTrack):
|
|||||||
n += b << bit_index
|
n += b << bit_index
|
||||||
yield n
|
yield n
|
||||||
|
|
||||||
def rewind(self, bit_count):
|
def rewind(self, bit_count=1):
|
||||||
self.bit_index -= 1
|
self.bit_index -= bit_count
|
||||||
if self.bit_index < 0:
|
if self.bit_index < 0:
|
||||||
self.bit_index = self.bit_count - 1
|
self.bit_index = self.bit_count - 1
|
||||||
self.revolutions -= 1
|
self.revolutions -= 1
|
||||||
|
Loading…
Reference in New Issue
Block a user