added license

This commit is contained in:
frank 2021-05-29 20:50:14 -04:00
parent 2a97cd761e
commit 7ffe45c711
3 changed files with 41 additions and 32 deletions

17
LICENSE.txt Normal file
View File

@ -0,0 +1,17 @@
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
This permission notice shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

50
README
View File

@ -11,45 +11,39 @@ Example
Save and run to create a project that redraws a square at a random location Save and run to create a project that redraws a square at a random location
every second. This script is also written in the `sample.py` file. every second. This script is also written in the `sample.py` file.
from time import sleep from time import sleep
from random import randint from random import randint
from pgfw.Game import Game from pgfw.Game import Game
class SampleGame(Game): class SampleGame(Game):
square_width = 30 square_width = 30
# instructions in the update method automatically run once every frame # instructions in the update method automatically run once every frame
def update(self): def update(self):
sleep(1) sleep(1)
screen = self.get_screen() screen = self.get_screen()
bounds = screen.get_size() bounds = screen.get_size()
screen.fill((0, 0, 0)) screen.fill((0, 0, 0))
screen.fill((255, 255, 255), screen.fill((255, 255, 255),
(randint(0, bounds[0]), randint(0, bounds[1]), (randint(0, bounds[0]), randint(0, bounds[1]),
self.square_width, self.square_width)) self.square_width, self.square_width))
if __name__ == '__main__': if __name__ == '__main__':
SampleGame().run() SampleGame().run()
License License
------- -------
This software is dedicated to the public domain. See MIT License
http://creativecommons.org/publicdomain/zero/1.0/ for details.
see LICENSE.txt for details
Todo Business
---- --------
- Remove unecessary python libraries from windows build 420@shampoo.ooo
- Debug levels
Credit
------
Frank DeMarco <if.self.end@a-o.in>

View File

@ -52,10 +52,8 @@ class Animation(GameChild):
def is_playing(self, method=None, check_all=False, include_delay=False): def is_playing(self, method=None, check_all=False, include_delay=False):
if check_all: if check_all:
return any(self.is_account_playing(account, include_delay) for \ return any(self.is_account_playing(account, include_delay) for method, account in self.accounts.items())
method, account in self.accounts.items()) return self.is_account_playing(self.accounts[self.get_default(method)], include_delay)
return self.is_account_playing(self.accounts[self.get_default(method)],
include_delay)
def is_account_playing(self, account, include_delay): def is_account_playing(self, account, include_delay):
return account.playing and (include_delay or not account.delay) return account.playing and (include_delay or not account.delay)