Compare commits
No commits in common. "master" and "v0.3" have entirely different histories.
5
.gitignore
vendored
@ -18,7 +18,8 @@ lib/
|
|||||||
lib64/
|
lib64/
|
||||||
parts/
|
parts/
|
||||||
sdist/
|
sdist/
|
||||||
target/
|
Tetris2000.build/
|
||||||
|
Tetris2000.build/
|
||||||
var/
|
var/
|
||||||
wheels/
|
wheels/
|
||||||
*.egg-info/
|
*.egg-info/
|
||||||
@ -30,7 +31,7 @@ MANIFEST
|
|||||||
# Usually these files are written by a python script from a template
|
# Usually these files are written by a python script from a template
|
||||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
*.manifest
|
*.manifest
|
||||||
*.spec
|
#*.spec
|
||||||
|
|
||||||
# Installer logs
|
# Installer logs
|
||||||
pip-log.txt
|
pip-log.txt
|
||||||
|
695
LICENSE
@ -1,674 +1,21 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
MIT License
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
Copyright (c) 2018 adrienmalin
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this license document, but changing it is not allowed.
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
Preamble
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
The GNU General Public License is a free, copyleft license for
|
furnished to do so, subject to the following conditions:
|
||||||
software and other kinds of works.
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
The licenses for most software and other practical works are designed
|
copies or substantial portions of the Software.
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
the GNU General Public License is intended to guarantee your freedom to
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
share and change all versions of a program--to make sure it remains free
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
software for all its users. We, the Free Software Foundation, use the
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
GNU General Public License for most of our software; it applies also to
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
any other work released this way by its authors. You can apply it to
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
your programs, too.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you
|
|
||||||
these rights or asking you to surrender the rights. Therefore, you have
|
|
||||||
certain responsibilities if you distribute copies of the software, or if
|
|
||||||
you modify it: responsibilities to respect the freedom of others.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
|
||||||
freedoms that you received. You must make sure that they, too, receive
|
|
||||||
or can get the source code. And you must show them these terms so they
|
|
||||||
know their rights.
|
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
|
||||||
that there is no warranty for this free software. For both users' and
|
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
|
||||||
changed, so that their problems will not be attributed erroneously to
|
|
||||||
authors of previous versions.
|
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
|
||||||
modified versions of the software inside them, although the manufacturer
|
|
||||||
can do so. This is fundamentally incompatible with the aim of
|
|
||||||
protecting users' freedom to change the software. The systematic
|
|
||||||
pattern of such abuse occurs in the area of products for individuals to
|
|
||||||
use, which is precisely where it is most unacceptable. Therefore, we
|
|
||||||
have designed this version of the GPL to prohibit the practice for those
|
|
||||||
products. If such problems arise substantially in other domains, we
|
|
||||||
stand ready to extend this provision to those domains in future versions
|
|
||||||
of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish to
|
|
||||||
avoid the special danger that patents applied to a free program could
|
|
||||||
make it effectively proprietary. To prevent this, the GPL assures that
|
|
||||||
patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the special requirements of the GNU Affero General Public License,
|
|
||||||
section 13, concerning interaction through a network will apply to the
|
|
||||||
combination as such.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
|
||||||
notice like this when it starts in an interactive mode:
|
|
||||||
|
|
||||||
<program> Copyright (C) <year> <name of author>
|
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, your program's commands
|
|
||||||
might be different; for a GUI interface, you would use an "about box".
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
|
||||||
<https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
|
||||||
may consider it more useful to permit linking proprietary applications with
|
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License. But first, please read
|
|
||||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
||||||
|
49
README.md
@ -1,44 +1,37 @@
|
|||||||
#  TETRIS 2000
|
#  TETRIS 2000
|
||||||
|
|
||||||
Yet another Tetris clone, with Qt5 on Python 3
|
Yet another Tetris clone, with Qt5 on Python 3
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Downloads
|
## Installation
|
||||||
|
|
||||||
* [Linux archive](https://git.malingrey.fr/adrien/TETRIS2000/archive/V0.3.1_fbs.tar.gz) (78.3 MB)
|
* [Download archive](https://github.com/adrienmalin/TETRIS2000/archive/master.zip) (34 Mo)
|
||||||
* [Windows installer](https://github.com/adrienmalin/TETRIS2000/releases/download/V0.3.1_fbs/TETRIS2000Setup.exe) (53.6 MB)
|
* Extract the archive
|
||||||
|
* Launch Tetris2000
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
* On Linux:
|
* Install [Python 3](https://www.python.org) with pip
|
||||||
|
|
||||||
```shell
|
* Install qtpy, qdarkstyle, and nuitka: (Nota: qdarkstyle don't support PySide2 yet)
|
||||||
mkdir TETRIS2000 # Create folder
|
|
||||||
cd TETRIS2000 # Enter folder
|
```bash
|
||||||
git clone https://git.malingrey.fr/adrien/TETRIS2000.git # Clone repository
|
pip3 install --user qtpy
|
||||||
python3 -m venv venv # Create a virtual environment
|
pip3 install --user qdarkstyle
|
||||||
source venv/bin/activate # Activate the virtual environment
|
pip3 install --user pyinstaller
|
||||||
pip3 install -r requirements.txt # Install requirements
|
|
||||||
python -m fbs run # Run application
|
|
||||||
python -m fbs freeze # Freeze
|
|
||||||
```
|
```
|
||||||
|
|
||||||
* On Windows:
|
* Clone repository:
|
||||||
|
|
||||||
Download and extract [source](https://git.malingrey.fr/adrien/TETRIS2000/archive/V0.3.1_fbs.zip).
|
```bash
|
||||||
Open a command prompt and go to extracted directory
|
git clone https://github.com/adrienmalin/Tetris2000
|
||||||
|
```
|
||||||
|
|
||||||
```batch
|
* Build with pyinstaller:
|
||||||
REM Create and activate a virtual environment
|
|
||||||
python -m venv venv
|
```bash
|
||||||
call venv\scripts\activate.bat
|
pyinstaller TETRIS2000.spec
|
||||||
REM Install requirements
|
|
||||||
pip install -r requirements.txt
|
|
||||||
REM Run application
|
|
||||||
python -m fbs run
|
|
||||||
REM Create installer
|
|
||||||
python -m fbs installer
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
22
TETRIS2000.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
Another TETRIS® clone
|
||||||
|
Tetris Game Design by Alexey Pajitnov.
|
||||||
|
Parts of comments issued from 2009 Tetris Design Guideline
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from qtpy import QtWidgets
|
||||||
|
|
||||||
|
from source.game_gui import Window
|
||||||
|
|
||||||
|
|
||||||
|
app = QtWidgets.QApplication.instance() or QtWidgets.QApplication(sys.argv)
|
||||||
|
win = Window()
|
||||||
|
win.show()
|
||||||
|
win.frames.new_game()
|
||||||
|
sys.exit(app.exec_())
|
43
TETRIS2000.spec
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# -*- mode: python -*-
|
||||||
|
|
||||||
|
block_cipher = None
|
||||||
|
|
||||||
|
|
||||||
|
a = Analysis(['TETRIS2000.py'],
|
||||||
|
pathex=[],
|
||||||
|
binaries=[],
|
||||||
|
datas=[
|
||||||
|
("backgrounds/*", "backgrounds"),
|
||||||
|
("fonts/*.ttf", "fonts"),
|
||||||
|
("fonts/*.otf", "fonts"),
|
||||||
|
("icons/*.ico", "icons"),
|
||||||
|
("icons/splash_screen.png", "icons"),
|
||||||
|
("locale/*.qm", "locale"),
|
||||||
|
("musics/*.mp3", "musics"),
|
||||||
|
("sfx/*.wav", "sfx")
|
||||||
|
],
|
||||||
|
hiddenimports=[],
|
||||||
|
hookspath=[],
|
||||||
|
runtime_hooks=[],
|
||||||
|
excludes=["PyQt4", "PySide", "PySide2"],
|
||||||
|
win_no_prefer_redirects=False,
|
||||||
|
win_private_assemblies=False,
|
||||||
|
cipher=block_cipher)
|
||||||
|
pyz = PYZ(a.pure, a.zipped_data,
|
||||||
|
cipher=block_cipher)
|
||||||
|
exe = EXE(pyz,
|
||||||
|
a.scripts,
|
||||||
|
exclude_binaries=True,
|
||||||
|
name='TETRIS2000',
|
||||||
|
debug=False,
|
||||||
|
strip=False,
|
||||||
|
upx=False,
|
||||||
|
console=False,
|
||||||
|
icon='icons\icon.ico')
|
||||||
|
coll = COLLECT(exe,
|
||||||
|
a.binaries,
|
||||||
|
a.zipfiles,
|
||||||
|
a.datas,
|
||||||
|
strip=False,
|
||||||
|
upx=False,
|
||||||
|
name='TETRIS2000')
|
Before Width: | Height: | Size: 444 KiB After Width: | Height: | Size: 444 KiB |
Before Width: | Height: | Size: 291 KiB After Width: | Height: | Size: 291 KiB |
Before Width: | Height: | Size: 220 KiB After Width: | Height: | Size: 220 KiB |
Before Width: | Height: | Size: 467 KiB After Width: | Height: | Size: 467 KiB |
Before Width: | Height: | Size: 945 KiB After Width: | Height: | Size: 945 KiB |
Before Width: | Height: | Size: 456 KiB After Width: | Height: | Size: 456 KiB |
Before Width: | Height: | Size: 549 KiB After Width: | Height: | Size: 549 KiB |
Before Width: | Height: | Size: 754 KiB After Width: | Height: | Size: 754 KiB |
Before Width: | Height: | Size: 642 KiB After Width: | Height: | Size: 642 KiB |
Before Width: | Height: | Size: 377 KiB After Width: | Height: | Size: 377 KiB |
Before Width: | Height: | Size: 526 KiB After Width: | Height: | Size: 526 KiB |
Before Width: | Height: | Size: 669 KiB After Width: | Height: | Size: 669 KiB |
Before Width: | Height: | Size: 597 KiB After Width: | Height: | Size: 597 KiB |
Before Width: | Height: | Size: 800 KiB After Width: | Height: | Size: 800 KiB |
Before Width: | Height: | Size: 416 KiB After Width: | Height: | Size: 416 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 183 B After Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 802 B After Width: | Height: | Size: 802 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
@ -3,39 +3,39 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>Frames</name>
|
<name>Frames</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="932"/>
|
<location filename="../frames.py" line="205"/>
|
||||||
<source>New game</source>
|
<source>New game</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="919"/>
|
<location filename="../frames.py" line="192"/>
|
||||||
<source>A game is in progress.
|
<source>A game is in progress.
|
||||||
Do you want to abord it?</source>
|
Do you want to abord it?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="932"/>
|
<location filename="../frames.py" line="205"/>
|
||||||
<source>Start level:</source>
|
<source>Start level:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1050"/>
|
<location filename="../frames.py" line="323"/>
|
||||||
<source>High score</source>
|
<source>High score</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1040"/>
|
<location filename="../frames.py" line="312"/>
|
||||||
<source>Game over</source>
|
<source>Game over</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1043"/>
|
<location filename="../frames.py" line="315"/>
|
||||||
<source>Congratulations!
|
<source>Congratulations!
|
||||||
You have the high score: {}</source>
|
You have the high score: {}</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1052"/>
|
<location filename="../frames.py" line="325"/>
|
||||||
<source>Score: {}
|
<source>Score: {}
|
||||||
High score: {}</source>
|
High score: {}</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@ -44,13 +44,13 @@ High score: {}</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>Matrix</name>
|
<name>Matrix</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="140"/>
|
<location filename="../matrix.py" line="73"/>
|
||||||
<source>Level
|
<source>Level
|
||||||
</source>
|
</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="425"/>
|
<location filename="../matrix.py" line="356"/>
|
||||||
<source>PAUSE
|
<source>PAUSE
|
||||||
|
|
||||||
Press %s
|
Press %s
|
||||||
@ -58,7 +58,7 @@ to resume</source>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="433"/>
|
<location filename="../matrix.py" line="364"/>
|
||||||
<source>GAME
|
<source>GAME
|
||||||
OVER</source>
|
OVER</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@ -67,97 +67,97 @@ OVER</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>SettingStrings</name>
|
<name>SettingStrings</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1078"/>
|
<location filename="../settings.py" line="20"/>
|
||||||
<source>Keyboard settings</source>
|
<source>Keyboard settings</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1079"/>
|
<location filename="../settings.py" line="21"/>
|
||||||
<source>Move left</source>
|
<source>Move left</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1080"/>
|
<location filename="../settings.py" line="22"/>
|
||||||
<source>Move right</source>
|
<source>Move right</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1081"/>
|
<location filename="../settings.py" line="23"/>
|
||||||
<source>Rotate clockwise</source>
|
<source>Rotate clockwise</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1082"/>
|
<location filename="../settings.py" line="24"/>
|
||||||
<source>Rotate counterclockwise</source>
|
<source>Rotate counterclockwise</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1083"/>
|
<location filename="../settings.py" line="25"/>
|
||||||
<source>Soft drop</source>
|
<source>Soft drop</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1084"/>
|
<location filename="../settings.py" line="26"/>
|
||||||
<source>Hard drop</source>
|
<source>Hard drop</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1085"/>
|
<location filename="../settings.py" line="27"/>
|
||||||
<source>Hold</source>
|
<source>Hold</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1086"/>
|
<location filename="../settings.py" line="28"/>
|
||||||
<source>Pause</source>
|
<source>Pause</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1087"/>
|
<location filename="../settings.py" line="29"/>
|
||||||
<source>Other settings</source>
|
<source>Other settings</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1089"/>
|
<location filename="../settings.py" line="31"/>
|
||||||
<source>Delays</source>
|
<source>Delays</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1090"/>
|
<location filename="../settings.py" line="32"/>
|
||||||
<source>Auto-shift delay</source>
|
<source>Auto-shift delay</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1091"/>
|
<location filename="../settings.py" line="33"/>
|
||||||
<source>Auto-repeat rate</source>
|
<source>Auto-repeat rate</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1093"/>
|
<location filename="../settings.py" line="35"/>
|
||||||
<source>Sound</source>
|
<source>Sound</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1094"/>
|
<location filename="../settings.py" line="36"/>
|
||||||
<source>Music volume</source>
|
<source>Music volume</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1095"/>
|
<location filename="../settings.py" line="37"/>
|
||||||
<source>Effects volume</source>
|
<source>Effects volume</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1097"/>
|
<location filename="../settings.py" line="39"/>
|
||||||
<source>Show ghost piece</source>
|
<source>Show ghost piece</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1098"/>
|
<location filename="../settings.py" line="40"/>
|
||||||
<source>Show next queue</source>
|
<source>Show next queue</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1099"/>
|
<location filename="../settings.py" line="41"/>
|
||||||
<source>Hold enabled</source>
|
<source>Hold enabled</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -165,7 +165,7 @@ OVER</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>SettingsDialog</name>
|
<name>SettingsDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1153"/>
|
<location filename="../settings.py" line="95"/>
|
||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -173,148 +173,137 @@ OVER</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>Stats</name>
|
<name>Stats</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="573"/>
|
<location filename="../stats.py" line="43"/>
|
||||||
<source>High score</source>
|
<source>High score</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="662"/>
|
<location filename="../stats.py" line="126"/>
|
||||||
<source>COMBO x{:n}
|
<source>COMBO x{:n}
|
||||||
{:n}</source>
|
{:n}</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="694"/>
|
<location filename="../stats.py" line="158"/>
|
||||||
<source>BACK TO BACK
|
<source>BACK TO BACK
|
||||||
{:n}</source>
|
{:n}</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Score: </source>
|
<source>Score: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>High score: </source>
|
<source>High score: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Time: {}
|
<source>Time: {}
|
||||||
</source>
|
</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Level: </source>
|
<source>Level: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Goal: </source>
|
<source>Goal: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Lines: </source>
|
<source>Lines: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Mini T-Spins: </source>
|
<source>Mini T-Spins: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>T-Spins: </source>
|
<source>T-Spins: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
|
<source>Back-to-back: </source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Max combo: </source>
|
<source>Max combo: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Combos: </source>
|
<source>Combos: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="749"/>
|
<location filename="../stats.py" line="228"/>
|
||||||
<source>Lines per minute: {:.1f}</source>
|
<source>Lines per minute: {:.1f}</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="749"/>
|
<location filename="../stats.py" line="228"/>
|
||||||
<source>Tetrominos locked down: </source>
|
<source>Tetrominos locked down: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="749"/>
|
<location filename="../stats.py" line="228"/>
|
||||||
<source>Tetrominos per minute: {:.1f}</source>
|
<source>Tetrominos per minute: {:.1f}</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="762"/>
|
<location filename="../stats.py" line="243"/>
|
||||||
<source>: </source>
|
<source>: </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../../../python/game_gui.py" line="658"/>
|
|
||||||
<source>COMBO
|
|
||||||
{:n}</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
|
||||||
<source>Back-to-backs: </source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
|
||||||
<source>Max back-to-back score: </source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Window</name>
|
<name>Window</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1450"/>
|
<location filename="../window.py" line="93"/>
|
||||||
<source>&New game</source>
|
<source>&New game</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1454"/>
|
<location filename="../window.py" line="97"/>
|
||||||
<source>&Settings</source>
|
<source>&Settings</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1458"/>
|
<location filename="../window.py" line="101"/>
|
||||||
<source>&About</source>
|
<source>&About</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1496"/>
|
<location filename="../window.py" line="139"/>
|
||||||
<source>Quit game?</source>
|
<source>Quit game?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1496"/>
|
<location filename="../window.py" line="139"/>
|
||||||
<source>A game is in progress.
|
<source>A game is in progress.
|
||||||
Do you want to abord it?</source>
|
Do you want to abord it?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1511"/>
|
<location filename="../window.py" line="154"/>
|
||||||
<source>High score</source>
|
<source>High score</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1469"/>
|
<location filename="../window.py" line="112"/>
|
||||||
<source>Tetris® clone by Adrien Malingrey
|
<source>Tetris® clone by Adrien Malingrey
|
||||||
|
|
||||||
Tetris Game Design by Alekseï Pajitnov
|
Tetris Game Design by Alekseï Pajitnov
|
||||||
Graphism inspired by Tetris Effect
|
Graphism inspired by Tetris Effect
|
||||||
Window style sheet: qdarkstyle by Colin Duquesnoy
|
Window style sheet: qdarkstyle by Colin Duquesnoy
|
||||||
Fonts by Markus Koellmann, Peter Wiegel
|
Fonts by Markus Koellmann, Peter Wiegel
|
||||||
@ -324,7 +313,7 @@ Pexels.com by Min An, Jaymantri, Felix Mittermeier
|
|||||||
Pixabay.com by LoganArt
|
Pixabay.com by LoganArt
|
||||||
Pixnio.com by Adrian Pelletier
|
Pixnio.com by Adrian Pelletier
|
||||||
Unsplash.com by Aron, Patrick Fore, Ilnur Kalimullin, Gabriel Garcia Marengo, Adnanta Raharja
|
Unsplash.com by Aron, Patrick Fore, Ilnur Kalimullin, Gabriel Garcia Marengo, Adnanta Raharja
|
||||||
StockSnap.io by Nathan Anderson, José Ignacio Pompé
|
StockSnap.io by Nathan Anderson, José Ignacio Pompé
|
||||||
Musics from ocremix.org by:
|
Musics from ocremix.org by:
|
||||||
CheDDer Nardz, djpretzel, MkVaff, Sir_NutS, R3FORGED, Sir_NutS
|
CheDDer Nardz, djpretzel, MkVaff, Sir_NutS, R3FORGED, Sir_NutS
|
||||||
Sound effects made with voc-one by Simple-Media</source>
|
Sound effects made with voc-one by Simple-Media</source>
|
@ -1,44 +1,44 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE TS>
|
<!DOCTYPE TS>
|
||||||
<TS version="2.0" language="fr_FR">
|
<TS version="2.1" language="fr_FR">
|
||||||
<context>
|
<context>
|
||||||
<name>Frames</name>
|
<name>Frames</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="932"/>
|
<location filename="../frames.py" line="205"/>
|
||||||
<source>New game</source>
|
<source>New game</source>
|
||||||
<translation>Nouvelle partie</translation>
|
<translation>Nouvelle partie</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="919"/>
|
<location filename="../frames.py" line="192"/>
|
||||||
<source>A game is in progress.
|
<source>A game is in progress.
|
||||||
Do you want to abord it?</source>
|
Do you want to abord it?</source>
|
||||||
<translation>Une partie est en cours.
|
<translation>Une partie est en cours.
|
||||||
Voulez-vous l'abandonner ?</translation>
|
Voulez-vous l'abandonner ?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="932"/>
|
<location filename="../frames.py" line="205"/>
|
||||||
<source>Start level:</source>
|
<source>Start level:</source>
|
||||||
<translation>Commencer au niveau :</translation>
|
<translation>Commencer au niveau :</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1050"/>
|
<location filename="../frames.py" line="323"/>
|
||||||
<source>High score</source>
|
<source>High score</source>
|
||||||
<translation>Meilleur score</translation>
|
<translation>Meilleur score</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1040"/>
|
<location filename="../frames.py" line="312"/>
|
||||||
<source>Game over</source>
|
<source>Game over</source>
|
||||||
<translation>Partie terminée</translation>
|
<translation>Partie terminée</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1043"/>
|
<location filename="../frames.py" line="315"/>
|
||||||
<source>Congratulations!
|
<source>Congratulations!
|
||||||
You have the high score: {}</source>
|
You have the high score: {}</source>
|
||||||
<translation>Bravo !
|
<translation>Bravo !
|
||||||
Vous avez atteint le meilleur score : {}</translation>
|
Vous avez atteint le meilleur score : {}</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1052"/>
|
<location filename="../frames.py" line="325"/>
|
||||||
<source>Score: {}
|
<source>Score: {}
|
||||||
High score: {}</source>
|
High score: {}</source>
|
||||||
<translation>Score : {}
|
<translation>Score : {}
|
||||||
@ -48,14 +48,14 @@ Meilleur score : {}</translation>
|
|||||||
<context>
|
<context>
|
||||||
<name>Matrix</name>
|
<name>Matrix</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="140"/>
|
<location filename="../matrix.py" line="73"/>
|
||||||
<source>Level
|
<source>Level
|
||||||
</source>
|
</source>
|
||||||
<translation>Niveau
|
<translation>Niveau
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="425"/>
|
<location filename="../matrix.py" line="356"/>
|
||||||
<source>PAUSE
|
<source>PAUSE
|
||||||
|
|
||||||
Press %s
|
Press %s
|
||||||
@ -67,7 +67,7 @@ Appuyez sur
|
|||||||
pour reprendre</translation>
|
pour reprendre</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="433"/>
|
<location filename="../matrix.py" line="364"/>
|
||||||
<source>GAME
|
<source>GAME
|
||||||
OVER</source>
|
OVER</source>
|
||||||
<translation>PARTIE
|
<translation>PARTIE
|
||||||
@ -77,97 +77,97 @@ TERMINÉE</translation>
|
|||||||
<context>
|
<context>
|
||||||
<name>SettingStrings</name>
|
<name>SettingStrings</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1078"/>
|
<location filename="../settings.py" line="20"/>
|
||||||
<source>Keyboard settings</source>
|
<source>Keyboard settings</source>
|
||||||
<translation>Configuration du clavier</translation>
|
<translation>Configuration du clavier</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1079"/>
|
<location filename="../settings.py" line="21"/>
|
||||||
<source>Move left</source>
|
<source>Move left</source>
|
||||||
<translation>Déplacer à gauche</translation>
|
<translation>Déplacer à gauche</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1080"/>
|
<location filename="../settings.py" line="22"/>
|
||||||
<source>Move right</source>
|
<source>Move right</source>
|
||||||
<translation>Déplacer à droite</translation>
|
<translation>Déplacer à droite</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1081"/>
|
<location filename="../settings.py" line="23"/>
|
||||||
<source>Rotate clockwise</source>
|
<source>Rotate clockwise</source>
|
||||||
<translation>Tourner dans le sens horaire</translation>
|
<translation>Tourner dans le sens horaire</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1082"/>
|
<location filename="../settings.py" line="24"/>
|
||||||
<source>Rotate counterclockwise</source>
|
<source>Rotate counterclockwise</source>
|
||||||
<translation>Tourner dans le sens anti-horaire</translation>
|
<translation>Tourner dans le sens anti-horaire</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1083"/>
|
<location filename="../settings.py" line="25"/>
|
||||||
<source>Soft drop</source>
|
<source>Soft drop</source>
|
||||||
<translation>Chute lente</translation>
|
<translation>Chute lente</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1084"/>
|
<location filename="../settings.py" line="26"/>
|
||||||
<source>Hard drop</source>
|
<source>Hard drop</source>
|
||||||
<translation>Chute rapide</translation>
|
<translation>Chute rapide</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1085"/>
|
<location filename="../settings.py" line="27"/>
|
||||||
<source>Hold</source>
|
<source>Hold</source>
|
||||||
<translation>Réserve</translation>
|
<translation>Réserve</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1086"/>
|
<location filename="../settings.py" line="28"/>
|
||||||
<source>Pause</source>
|
<source>Pause</source>
|
||||||
<translation>Pause</translation>
|
<translation>Pause</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1087"/>
|
<location filename="../settings.py" line="29"/>
|
||||||
<source>Other settings</source>
|
<source>Other settings</source>
|
||||||
<translation>Autres paramètres</translation>
|
<translation>Autres paramètres</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1089"/>
|
<location filename="../settings.py" line="31"/>
|
||||||
<source>Delays</source>
|
<source>Delays</source>
|
||||||
<translation>Temporisation</translation>
|
<translation>Temporisation</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1090"/>
|
<location filename="../settings.py" line="32"/>
|
||||||
<source>Auto-shift delay</source>
|
<source>Auto-shift delay</source>
|
||||||
<translation>Délai avant répétition</translation>
|
<translation>Délai avant répétition</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1091"/>
|
<location filename="../settings.py" line="33"/>
|
||||||
<source>Auto-repeat rate</source>
|
<source>Auto-repeat rate</source>
|
||||||
<translation>Vitesse de répétition</translation>
|
<translation>Vitesse de répétition</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1093"/>
|
<location filename="../settings.py" line="35"/>
|
||||||
<source>Sound</source>
|
<source>Sound</source>
|
||||||
<translation>Son</translation>
|
<translation>Son</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1094"/>
|
<location filename="../settings.py" line="36"/>
|
||||||
<source>Music volume</source>
|
<source>Music volume</source>
|
||||||
<translation>Volume de la musique</translation>
|
<translation>Volume de la musique</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1095"/>
|
<location filename="../settings.py" line="37"/>
|
||||||
<source>Effects volume</source>
|
<source>Effects volume</source>
|
||||||
<translation>Volume des effets sonores</translation>
|
<translation>Volume des effets sonores</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1097"/>
|
<location filename="../settings.py" line="39"/>
|
||||||
<source>Show ghost piece</source>
|
<source>Show ghost piece</source>
|
||||||
<translation>Afficher la pièce fantôme</translation>
|
<translation>Afficher la pièce fantôme</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1098"/>
|
<location filename="../settings.py" line="40"/>
|
||||||
<source>Show next queue</source>
|
<source>Show next queue</source>
|
||||||
<translation>Afficher les 6 prochaines pièces</translation>
|
<translation>Afficher les 6 prochaines pièces</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1099"/>
|
<location filename="../settings.py" line="41"/>
|
||||||
<source>Hold enabled</source>
|
<source>Hold enabled</source>
|
||||||
<translation>Activer la réserve</translation>
|
<translation>Activer la réserve</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -175,7 +175,7 @@ TERMINÉE</translation>
|
|||||||
<context>
|
<context>
|
||||||
<name>SettingsDialog</name>
|
<name>SettingsDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1153"/>
|
<location filename="../settings.py" line="95"/>
|
||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translation>Préférences</translation>
|
<translation>Préférences</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -183,150 +183,133 @@ TERMINÉE</translation>
|
|||||||
<context>
|
<context>
|
||||||
<name>Stats</name>
|
<name>Stats</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="573"/>
|
<location filename="../stats.py" line="43"/>
|
||||||
<source>High score</source>
|
<source>High score</source>
|
||||||
<translation>Meilleur score</translation>
|
<translation>Meilleur score</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="662"/>
|
<location filename="../stats.py" line="126"/>
|
||||||
<source>COMBO x{:n}
|
<source>COMBO x{:n}
|
||||||
{:n}</source>
|
{:n}</source>
|
||||||
<translation>COMBO x{:n}
|
<translation>COMBO x{:n}
|
||||||
{:n}</translation>
|
{:n}</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="694"/>
|
<location filename="../stats.py" line="158"/>
|
||||||
<source>BACK TO BACK
|
<source>BACK TO BACK
|
||||||
{:n}</source>
|
{:n}</source>
|
||||||
<translation>BACK TO BACK
|
<translation>BACK TO BACK
|
||||||
{:n}</translation>
|
{:n}</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Time: {}
|
<source>Time: {}
|
||||||
</source>
|
</source>
|
||||||
<translation>Temps : {}
|
<translation>Temps : {}
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="749"/>
|
<location filename="../stats.py" line="228"/>
|
||||||
<source>Lines per minute: {:.1f}</source>
|
<source>Lines per minute: {:.1f}</source>
|
||||||
<translation>Lignes par minute : {:.1f}</translation>
|
<translation>Lignes par minute : {:.1f}</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="749"/>
|
<location filename="../stats.py" line="228"/>
|
||||||
<source>Tetrominos per minute: {:.1f}</source>
|
<source>Tetrominos per minute: {:.1f}</source>
|
||||||
<translation>Tétrominos par minute : {:.1f}</translation>
|
<translation>Tétrominos par minute : {:.1f}</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Score: </source>
|
<source>Score: </source>
|
||||||
<translation>Score : </translation>
|
<translation>Score : </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>High score: </source>
|
<source>High score: </source>
|
||||||
<translation>Meilleur score : </translation>
|
<translation>Meilleur score : </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Level: </source>
|
<source>Level: </source>
|
||||||
<translation>Niveau : </translation>
|
<translation>Niveau : </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Goal: </source>
|
<source>Goal: </source>
|
||||||
<translation>Objectif : </translation>
|
<translation>Objectif : </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Lines: </source>
|
<source>Lines: </source>
|
||||||
<translation>Lignes : </translation>
|
<translation>Lignes : </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Mini T-Spins: </source>
|
<source>Mini T-Spins: </source>
|
||||||
<translation>Mini T-Spins : </translation>
|
<translation>Mini T-Spins : </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>T-Spins: </source>
|
<source>T-Spins: </source>
|
||||||
<translation>T-Spins : </translation>
|
<translation>T-Spins : </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../stats.py" line="189"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Back-to-back: </source>
|
<source>Back-to-back: </source>
|
||||||
<translation type="obsolete">Back-to-back : </translation>
|
<translation>Back-to-back : </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Max combo: </source>
|
<source>Max combo: </source>
|
||||||
<translation>Combo max : </translation>
|
<translation>Combo max : </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
<location filename="../stats.py" line="189"/>
|
||||||
<source>Combos: </source>
|
<source>Combos: </source>
|
||||||
<translation>Combos : </translation>
|
<translation>Combos : </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="749"/>
|
<location filename="../stats.py" line="228"/>
|
||||||
<source>Tetrominos locked down: </source>
|
<source>Tetrominos locked down: </source>
|
||||||
<translation>Tétrominos bloqués : </translation>
|
<translation>Tétrominos bloqués : </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="762"/>
|
<location filename="../stats.py" line="243"/>
|
||||||
<source>: </source>
|
<source>: </source>
|
||||||
<translation> : </translation>
|
<translation> : </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../../../python/game_gui.py" line="658"/>
|
|
||||||
<source>COMBO
|
|
||||||
{:n}</source>
|
|
||||||
<translation>COMBO
|
|
||||||
{:n}</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
|
||||||
<source>Back-to-backs: </source>
|
|
||||||
<translation>Back-to-backs :</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../../python/game_gui.py" line="731"/>
|
|
||||||
<source>Max back-to-back score: </source>
|
|
||||||
<translation type="unfinished">Score max back-to-back : </translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Window</name>
|
<name>Window</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1511"/>
|
<location filename="../window.py" line="154"/>
|
||||||
<source>High score</source>
|
<source>High score</source>
|
||||||
<translation>Meilleur score</translation>
|
<translation>Meilleur score</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1450"/>
|
<location filename="../window.py" line="93"/>
|
||||||
<source>&New game</source>
|
<source>&New game</source>
|
||||||
<translation>&Nouvelle partie</translation>
|
<translation>&Nouvelle partie</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1454"/>
|
<location filename="../window.py" line="97"/>
|
||||||
<source>&Settings</source>
|
<source>&Settings</source>
|
||||||
<translation>&Préférences</translation>
|
<translation>&Préférences</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1458"/>
|
<location filename="../window.py" line="101"/>
|
||||||
<source>&About</source>
|
<source>&About</source>
|
||||||
<translation>&À propos</translation>
|
<translation>&À propos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1496"/>
|
<location filename="../window.py" line="139"/>
|
||||||
<source>A game is in progress.
|
<source>A game is in progress.
|
||||||
Do you want to abord it?</source>
|
Do you want to abord it?</source>
|
||||||
<translation>Une partie est en cours.
|
<translation>Une partie est en cours.
|
||||||
Voulez-vous l'abandonner ?</translation>
|
Voulez-vous l'abandonner ?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../python/game_gui.py" line="1496"/>
|
<location filename="../window.py" line="139"/>
|
||||||
<source>Quit game?</source>
|
<source>Quit game?</source>
|
||||||
<translation>Quitter la partie ?</translation>
|
<translation>Quitter la partie ?</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -348,7 +331,7 @@ StockSnap.io by Nathan Anderson, José Ignacio Pompé
|
|||||||
Musics from ocremix.org by:
|
Musics from ocremix.org by:
|
||||||
CheDDer Nardz, djpretzel, MkVaff, Sir_NutS, R3FORGED, Sir_NutS
|
CheDDer Nardz, djpretzel, MkVaff, Sir_NutS, R3FORGED, Sir_NutS
|
||||||
Sound effects made with voc-one by Simple-Media</source>
|
Sound effects made with voc-one by Simple-Media</source>
|
||||||
<translation type="obsolete">Clone de Tetris® par Adrien Malingrey
|
<translation>Clone de Tetris® par Adrien Malingrey
|
||||||
|
|
||||||
Conception du jeu : Alekseï Pajitnov
|
Conception du jeu : Alekseï Pajitnov
|
||||||
Graphismes inspirés de Tetris Effect
|
Graphismes inspirés de Tetris Effect
|
||||||
@ -365,25 +348,5 @@ Musiques issues de ocremix.org par :
|
|||||||
CheDDer Nardz, djpretzel, MkVaff, Sir_NutS, R3FORGED, Sir_NutS
|
CheDDer Nardz, djpretzel, MkVaff, Sir_NutS, R3FORGED, Sir_NutS
|
||||||
Effets sonores réalisés avec voc-one de Simple-Media</translation>
|
Effets sonores réalisés avec voc-one de Simple-Media</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../../../python/game_gui.py" line="1469"/>
|
|
||||||
<source>Tetris® clone by Adrien Malingrey
|
|
||||||
|
|
||||||
Tetris Game Design by Alekseï Pajitnov
|
|
||||||
Graphism inspired by Tetris Effect
|
|
||||||
Window style sheet: qdarkstyle by Colin Duquesnoy
|
|
||||||
Fonts by Markus Koellmann, Peter Wiegel
|
|
||||||
Images from:
|
|
||||||
OpenGameArt.org by beren77, Duion
|
|
||||||
Pexels.com by Min An, Jaymantri, Felix Mittermeier
|
|
||||||
Pixabay.com by LoganArt
|
|
||||||
Pixnio.com by Adrian Pelletier
|
|
||||||
Unsplash.com by Aron, Patrick Fore, Ilnur Kalimullin, Gabriel Garcia Marengo, Adnanta Raharja
|
|
||||||
StockSnap.io by Nathan Anderson, José Ignacio Pompé
|
|
||||||
Musics from ocremix.org by:
|
|
||||||
CheDDer Nardz, djpretzel, MkVaff, Sir_NutS, R3FORGED, Sir_NutS
|
|
||||||
Sound effects made with voc-one by Simple-Media</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
</TS>
|
</TS>
|
3
locale/update_ts.bat
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
for /F %%n in ('dir /B *.ts') do pylupdate5 -verbose ..\window.py ..\settings.py ..\stats.py ..\matrix.py ..\frames.py -ts %%n
|
||||||
|
echo You may need to edit *.ts files with a text editor to correct special characters
|
||||||
|
pause
|
3
locale/update_ts_noobsolete.bat
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
for /F %%n in ('dir /B *.ts') do pylupdate5 -verbose ..\window.py ..\settings.py ..\stats.py ..\matrix.py ..\frames.py -ts -noobsolete %%n
|
||||||
|
echo You may need to edit *.ts files with a text editor to correct special characters
|
||||||
|
pause
|
@ -1,4 +0,0 @@
|
|||||||
fbs
|
|
||||||
PyQt5==5.9.2
|
|
||||||
PyInstaller==3.3.1
|
|
||||||
qdarkstyle
|
|
@ -3,27 +3,30 @@
|
|||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from PyQt5 import QtGui
|
from qtpy import QtGui
|
||||||
|
|
||||||
|
|
||||||
# Paths
|
# Paths
|
||||||
ICON_PATH = "icons/icon.ico"
|
PATH = os.path.dirname(os.path.abspath(__file__))
|
||||||
BG_IMAGE_DIR = "backgrounds"
|
PATH = os.path.dirname(PATH)
|
||||||
START_BG_IMAGE_PATH = os.path.join(BG_IMAGE_DIR, "01-spacefield_a-000.png")
|
ICON_PATH = os.path.join(PATH, "icons", "icon.ico")
|
||||||
MUSICS_DIR = "musics"
|
BG_IMAGE_DIR = os.path.join(PATH, "backgrounds")
|
||||||
SFX_DIR = "sfx"
|
START_BG_IMAGE_NAME = "01-spacefield_a-000.png"
|
||||||
|
MUSICS_DIR = os.path.join(PATH, "musics")
|
||||||
|
SFX_DIR = os.path.join(PATH, "sfx")
|
||||||
LINE_CLEAR_SFX_PATH = os.path.join(SFX_DIR, "line_clear.wav")
|
LINE_CLEAR_SFX_PATH = os.path.join(SFX_DIR, "line_clear.wav")
|
||||||
TETRIS_SFX_PATH = os.path.join(SFX_DIR, "tetris.wav")
|
TETRIS_SFX_PATH = os.path.join(SFX_DIR, "tetris.wav")
|
||||||
ROTATE_SFX_PATH = os.path.join(SFX_DIR, "rotate.wav")
|
ROTATE_SFX_PATH = os.path.join(SFX_DIR, "rotate.wav")
|
||||||
HARD_DROP_SFX_PATH = os.path.join(SFX_DIR, "hard_drop.wav")
|
HARD_DROP_SFX_PATH = os.path.join(SFX_DIR, "hard_drop.wav")
|
||||||
WALL_SFX_PATH = os.path.join(SFX_DIR, "wall.wav")
|
WALL_SFX_PATH = os.path.join(SFX_DIR, "wall.wav")
|
||||||
LOCALE_PATH = "locale"
|
LOCALE_PATH = os.path.join(PATH, "locale")
|
||||||
FONTS_DIR = "fonts"
|
FONTS_DIR = os.path.join(PATH, "fonts")
|
||||||
STATS_FONT_PATH = os.path.join(FONTS_DIR, "PixelCaps!.otf")
|
STATS_FONT_PATH = os.path.join(FONTS_DIR, "PixelCaps!.otf")
|
||||||
STATS_FONT_NAME = "PixelCaps!"
|
STATS_FONT_NAME = "PixelCaps!"
|
||||||
MATRIX_FONT_PATH = os.path.join(FONTS_DIR, "maass slicer Italic.ttf")
|
MATRIX_FONT_PATH = os.path.join(FONTS_DIR, "maass slicer Italic.ttf")
|
||||||
MATRIX_FONT_NAME = "Maassslicer"
|
MATRIX_FONT_NAME = "Maassslicer"
|
||||||
SPLASH_SCREEN_PATH = "splashscreen/splashscreen.png"
|
|
||||||
|
SPLASH_SCREEN_PATH = os.path.join(PATH, "icons", "splash_screen.png")
|
||||||
|
|
||||||
# Coordinates and direction
|
# Coordinates and direction
|
||||||
L, R, U, D = -1, 1, -1, 1 # Left, Right, Up, Down
|
L, R, U, D = -1, 1, -1, 1 # Left, Right, Up, Down
|
||||||
@ -34,7 +37,7 @@ ANIMATION_DELAY = 67
|
|||||||
INITIAL_SPEED = 1000
|
INITIAL_SPEED = 1000
|
||||||
ENTRY_DELAY = 80
|
ENTRY_DELAY = 80
|
||||||
LINE_CLEAR_DELAY = 80
|
LINE_CLEAR_DELAY = 80
|
||||||
LOCK_DELAY = 1000
|
LOCK_DELAY = 500
|
||||||
TEMPORARY_TEXT_DURATION = 1000
|
TEMPORARY_TEXT_DURATION = 1000
|
||||||
AFTER_LVL_15_ACCELERATION = 0.9
|
AFTER_LVL_15_ACCELERATION = 0.9
|
||||||
|
|
@ -7,15 +7,13 @@ import itertools
|
|||||||
import locale
|
import locale
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import functools
|
from qtpy import QtWidgets, QtCore, QtGui, QtMultimedia
|
||||||
from PyQt5 import QtWidgets, QtCore, QtGui, QtMultimedia
|
|
||||||
QtCore.Signal = QtCore.pyqtSignal
|
|
||||||
|
|
||||||
import consts
|
from . import consts
|
||||||
from consts import L, R, CLOCKWISE, COUNTERCLOCKWISE
|
from .consts import L, R, CLOCKWISE, COUNTERCLOCKWISE
|
||||||
from __version__ import __title__, __author__, __version__
|
from .__version__ import __title__, __author__, __version__
|
||||||
from point import Point
|
from .point import Point
|
||||||
from tetromino import Block, Tetromino, GhostPiece
|
from .tetromino import Block, Tetromino, GhostPiece
|
||||||
|
|
||||||
|
|
||||||
class Grid(QtWidgets.QWidget):
|
class Grid(QtWidgets.QWidget):
|
||||||
@ -26,7 +24,7 @@ class Grid(QtWidgets.QWidget):
|
|||||||
ROWS = consts.GRID_DEFAULT_ROWS + consts.GRID_INVISIBLE_ROWS
|
ROWS = consts.GRID_DEFAULT_ROWS + consts.GRID_INVISIBLE_ROWS
|
||||||
COLUMNS = consts.GRID_DEFAULT_COLUMNS
|
COLUMNS = consts.GRID_DEFAULT_COLUMNS
|
||||||
STARTING_POSITION = Point(
|
STARTING_POSITION = Point(
|
||||||
consts.GRID_DEFAULT_COLUMNS // 2 - 1,
|
consts.GRID_DEFAULT_COLUMNS // 2,
|
||||||
consts.GRID_DEFAULT_ROWS // 2 + consts.GRID_INVISIBLE_ROWS,
|
consts.GRID_DEFAULT_ROWS // 2 + consts.GRID_INVISIBLE_ROWS,
|
||||||
)
|
)
|
||||||
GRIDLINE_COLOR = consts.GRID_GRIDLINE_COLOR
|
GRIDLINE_COLOR = consts.GRID_GRIDLINE_COLOR
|
||||||
@ -94,10 +92,10 @@ class Matrix(Grid):
|
|||||||
drop_signal = QtCore.Signal(int)
|
drop_signal = QtCore.Signal(int)
|
||||||
lock_signal = QtCore.Signal(int, str)
|
lock_signal = QtCore.Signal(int, str)
|
||||||
|
|
||||||
def __init__(self, frames, app):
|
def __init__(self, frames):
|
||||||
super().__init__(frames)
|
super().__init__(frames)
|
||||||
|
|
||||||
self.load_sfx(app)
|
self.load_sfx()
|
||||||
|
|
||||||
self.game_over = False
|
self.game_over = False
|
||||||
self.text = ""
|
self.text = ""
|
||||||
@ -111,23 +109,20 @@ class Matrix(Grid):
|
|||||||
self.auto_repeat_timer.timeout.connect(self.auto_repeat)
|
self.auto_repeat_timer.timeout.connect(self.auto_repeat)
|
||||||
self.fall_timer = QtCore.QTimer()
|
self.fall_timer = QtCore.QTimer()
|
||||||
self.fall_timer.timeout.connect(self.fall)
|
self.fall_timer.timeout.connect(self.fall)
|
||||||
self.lock_timer = QtCore.QTimer()
|
|
||||||
self.lock_timer.timeout.connect(self.lock_phase)
|
|
||||||
self.lock_timer.setSingleShot(True)
|
|
||||||
|
|
||||||
self.cells = []
|
self.cells = []
|
||||||
|
|
||||||
def load_sfx(self, app):
|
def load_sfx(self):
|
||||||
self.wall_sfx = QtMultimedia.QSoundEffect(self)
|
self.wall_sfx = QtMultimedia.QSoundEffect(self)
|
||||||
url = QtCore.QUrl.fromLocalFile(app.get_resource(consts.WALL_SFX_PATH))
|
url = QtCore.QUrl.fromLocalFile(consts.WALL_SFX_PATH)
|
||||||
self.wall_sfx.setSource(url)
|
self.wall_sfx.setSource(url)
|
||||||
|
|
||||||
self.rotate_sfx = QtMultimedia.QSoundEffect(self)
|
self.rotate_sfx = QtMultimedia.QSoundEffect(self)
|
||||||
url = QtCore.QUrl.fromLocalFile(app.get_resource(consts.ROTATE_SFX_PATH))
|
url = QtCore.QUrl.fromLocalFile(consts.ROTATE_SFX_PATH)
|
||||||
self.rotate_sfx.setSource(url)
|
self.rotate_sfx.setSource(url)
|
||||||
|
|
||||||
self.hard_drop_sfx = QtMultimedia.QSoundEffect(self)
|
self.hard_drop_sfx = QtMultimedia.QSoundEffect(self)
|
||||||
url = QtCore.QUrl.fromLocalFile(app.get_resource(consts.HARD_DROP_SFX_PATH))
|
url = QtCore.QUrl.fromLocalFile(consts.HARD_DROP_SFX_PATH)
|
||||||
self.hard_drop_sfx.setSource(url)
|
self.hard_drop_sfx.setSource(url)
|
||||||
|
|
||||||
def new_game(self):
|
def new_game(self):
|
||||||
@ -278,12 +273,9 @@ class Matrix(Grid):
|
|||||||
|
|
||||||
elif action == s.SOFT_DROP:
|
elif action == s.SOFT_DROP:
|
||||||
if self.piece.soft_drop():
|
if self.piece.soft_drop():
|
||||||
self.lock_wait()
|
|
||||||
self.drop_signal.emit(1)
|
self.drop_signal.emit(1)
|
||||||
self.wall_hit = False
|
self.wall_hit = False
|
||||||
else:
|
elif not self.wall_hit:
|
||||||
self.lock_start()
|
|
||||||
if not self.wall_hit:
|
|
||||||
self.wall_hit = True
|
self.wall_hit = True
|
||||||
self.wall_sfx.play()
|
self.wall_sfx.play()
|
||||||
|
|
||||||
@ -302,16 +294,8 @@ class Matrix(Grid):
|
|||||||
""" Reset the animation movement of the Matrix on a hard drop """
|
""" Reset the animation movement of the Matrix on a hard drop """
|
||||||
self.top_left_corner -= Point(0, self.HARD_DROP_MOVEMENT * Block.side)
|
self.top_left_corner -= Point(0, self.HARD_DROP_MOVEMENT * Block.side)
|
||||||
|
|
||||||
def lock_start(self):
|
|
||||||
if not self.lock_timer.isActive():
|
|
||||||
self.lock_timer.start(self.lock_delay)
|
|
||||||
for mino in self.piece.minoes:
|
|
||||||
mino.shine(1)
|
|
||||||
self.update()
|
|
||||||
|
|
||||||
def lock_wait(self):
|
def lock_wait(self):
|
||||||
if self.lock_timer.isActive():
|
self.fall_delay = time.time() + (self.speed + self.lock_delay) / 1000
|
||||||
self.lock_timer.start(self.lock_delay)
|
|
||||||
|
|
||||||
def fall(self):
|
def fall(self):
|
||||||
"""
|
"""
|
||||||
@ -325,7 +309,8 @@ class Matrix(Grid):
|
|||||||
if self.piece.move(0, 1):
|
if self.piece.move(0, 1):
|
||||||
self.lock_wait()
|
self.lock_wait()
|
||||||
else:
|
else:
|
||||||
self.lock_start()
|
if time.time() >= self.fall_delay:
|
||||||
|
self.lock_phase()
|
||||||
|
|
||||||
def lock_phase(self):
|
def lock_phase(self):
|
||||||
"""
|
"""
|
||||||
@ -338,10 +323,6 @@ class Matrix(Grid):
|
|||||||
before it actually Locks Down.
|
before it actually Locks Down.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if self.piece.move(0, 1):
|
|
||||||
self.lock_wait()
|
|
||||||
return
|
|
||||||
|
|
||||||
self.wall_sfx.play()
|
self.wall_sfx.play()
|
||||||
|
|
||||||
# Enter minoes into the matrix
|
# Enter minoes into the matrix
|
||||||
@ -379,7 +360,7 @@ class Matrix(Grid):
|
|||||||
block.shine()
|
block.shine()
|
||||||
self.spotlight = row[self.COLUMNS // 2].coord
|
self.spotlight = row[self.COLUMNS // 2].coord
|
||||||
self.auto_repeat_timer.stop()
|
self.auto_repeat_timer.stop()
|
||||||
self.lock_signal.emit(len(self.complete_lines), self.piece.t_spin())
|
self.lock_signal.emit(len(self.complete_lines), self.piece.t_spin)
|
||||||
|
|
||||||
if self.complete_lines:
|
if self.complete_lines:
|
||||||
self.fall_timer.stop()
|
self.fall_timer.stop()
|
||||||
@ -511,7 +492,7 @@ class NextQueue(Grid):
|
|||||||
|
|
||||||
def insert_pieces(self):
|
def insert_pieces(self):
|
||||||
for y, piece in enumerate(self.pieces):
|
for y, piece in enumerate(self.pieces):
|
||||||
piece.insert_into(self, self.STARTING_POSITION + Point(0, 3 * y - 4))
|
piece.insert_into(self, Point(3, 3 * y + 1))
|
||||||
|
|
||||||
def paintEvent(self, event=None):
|
def paintEvent(self, event=None):
|
||||||
if not settings[s.OTHER][s.SHOW_NEXT_QUEUE]:
|
if not settings[s.OTHER][s.SHOW_NEXT_QUEUE]:
|
||||||
@ -570,12 +551,12 @@ class Stats(QtWidgets.QWidget):
|
|||||||
|
|
||||||
temporary_text = QtCore.Signal(str)
|
temporary_text = QtCore.Signal(str)
|
||||||
|
|
||||||
def __init__(self, frames, app):
|
def __init__(self, frames):
|
||||||
super().__init__(frames)
|
super().__init__(frames)
|
||||||
self.frames = frames
|
self.frames = frames
|
||||||
self.setStyleSheet("background-color: transparent")
|
self.setStyleSheet("background-color: transparent")
|
||||||
|
|
||||||
self.load_sfx(app)
|
self.load_sfx()
|
||||||
|
|
||||||
self.setSizePolicy(
|
self.setSizePolicy(
|
||||||
QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding
|
QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding
|
||||||
@ -588,13 +569,13 @@ class Stats(QtWidgets.QWidget):
|
|||||||
|
|
||||||
self.high_score = int(qsettings.value(self.tr("High score"), 0))
|
self.high_score = int(qsettings.value(self.tr("High score"), 0))
|
||||||
|
|
||||||
def load_sfx(self, app):
|
def load_sfx(self):
|
||||||
self.line_clear_sfx = QtMultimedia.QSoundEffect(self)
|
self.line_clear_sfx = QtMultimedia.QSoundEffect(self)
|
||||||
url = QtCore.QUrl.fromLocalFile(app.get_resource(consts.LINE_CLEAR_SFX_PATH))
|
url = QtCore.QUrl.fromLocalFile(consts.LINE_CLEAR_SFX_PATH)
|
||||||
self.line_clear_sfx.setSource(url)
|
self.line_clear_sfx.setSource(url)
|
||||||
|
|
||||||
self.tetris_sfx = QtMultimedia.QSoundEffect(self)
|
self.tetris_sfx = QtMultimedia.QSoundEffect(self)
|
||||||
url = QtCore.QUrl.fromLocalFile(app.get_resource(consts.TETRIS_SFX_PATH))
|
url = QtCore.QUrl.fromLocalFile(consts.TETRIS_SFX_PATH)
|
||||||
self.tetris_sfx.setSource(url)
|
self.tetris_sfx.setSource(url)
|
||||||
|
|
||||||
def new_game(self):
|
def new_game(self):
|
||||||
@ -606,7 +587,6 @@ class Stats(QtWidgets.QWidget):
|
|||||||
self.mini_t_spin_total = 0
|
self.mini_t_spin_total = 0
|
||||||
self.nb_back_to_back = 0
|
self.nb_back_to_back = 0
|
||||||
self.back_to_back_scores = None
|
self.back_to_back_scores = None
|
||||||
self.max_back_to_back_score = 0
|
|
||||||
self.combo = -1
|
self.combo = -1
|
||||||
self.combos_total = 0
|
self.combos_total = 0
|
||||||
self.max_combo = 0
|
self.max_combo = 0
|
||||||
@ -658,6 +638,7 @@ class Stats(QtWidgets.QWidget):
|
|||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# Combo
|
# Combo
|
||||||
# Bonus for complete lines on each consecutive lock downs
|
# Bonus for complete lines on each consecutive lock downs
|
||||||
|
# if nb_complete_lines:
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
if nb_complete_lines:
|
if nb_complete_lines:
|
||||||
self.combo += 1
|
self.combo += 1
|
||||||
@ -669,11 +650,6 @@ class Stats(QtWidgets.QWidget):
|
|||||||
self.score_total += combo_score
|
self.score_total += combo_score
|
||||||
self.max_combo = max(self.max_combo, self.combo)
|
self.max_combo = max(self.max_combo, self.combo)
|
||||||
self.combos_total += 1
|
self.combos_total += 1
|
||||||
if self.combo == 1:
|
|
||||||
self.temporary_text.emit(
|
|
||||||
self.tr("COMBO\n{:n}").format(combo_score)
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
self.temporary_text.emit(
|
self.temporary_text.emit(
|
||||||
self.tr("COMBO x{:n}\n{:n}").format(self.combo, combo_score)
|
self.tr("COMBO x{:n}\n{:n}").format(self.combo, combo_score)
|
||||||
)
|
)
|
||||||
@ -709,7 +685,6 @@ class Stats(QtWidgets.QWidget):
|
|||||||
self.temporary_text.emit(
|
self.temporary_text.emit(
|
||||||
self.tr("BACK TO BACK\n{:n}").format(b2b_score)
|
self.tr("BACK TO BACK\n{:n}").format(b2b_score)
|
||||||
)
|
)
|
||||||
self.max_back_to_back_score = max(self.max_back_to_back_score, b2b_score)
|
|
||||||
self.back_to_back_scores = None
|
self.back_to_back_scores = None
|
||||||
|
|
||||||
self.high_score = max(self.score_total, self.high_score)
|
self.high_score = max(self.score_total, self.high_score)
|
||||||
@ -737,37 +712,55 @@ class Stats(QtWidgets.QWidget):
|
|||||||
QtCore.QRectF(self.rect()), self.text(sep="\n\n"), self.text_options
|
QtCore.QRectF(self.rect()), self.text(sep="\n\n"), self.text_options
|
||||||
)
|
)
|
||||||
|
|
||||||
"""
|
|
||||||
Returns a strings representing number with the locale thousand separator
|
|
||||||
"""
|
|
||||||
thousand_separated = functools.partial(locale.format, "%i", grouping=True, monetary=True)
|
|
||||||
|
|
||||||
def text(self, full_stats=False, sep="\n"):
|
def text(self, full_stats=False, sep="\n"):
|
||||||
text = (
|
text = (
|
||||||
self.tr("Score: ") + self.thousand_separated(self.score_total) + sep
|
self.tr("Score: ")
|
||||||
+ self.tr("High score: ") + self.thousand_separated(self.high_score) + sep
|
+ locale.format("%i", self.score_total, grouping=True, monetary=True)
|
||||||
|
+ sep
|
||||||
|
+ self.tr("High score: ")
|
||||||
|
+ locale.format("%i", self.high_score, grouping=True, monetary=True)
|
||||||
|
+ sep
|
||||||
+ self.tr("Time: {}\n").format(
|
+ self.tr("Time: {}\n").format(
|
||||||
time.strftime("%H:%M:%S", time.gmtime(self.chronometer))
|
time.strftime("%H:%M:%S", time.gmtime(self.chronometer))
|
||||||
) + sep
|
)
|
||||||
+ self.tr("Level: ") + self.thousand_separated(self.level) + sep
|
+ sep
|
||||||
+ self.tr("Goal: ") + self.thousand_separated(self.goal) + sep
|
+ self.tr("Level: ")
|
||||||
+ self.tr("Lines: ") + self.thousand_separated(self.complete_lines_total) + sep
|
+ locale.format("%i", self.level, grouping=True, monetary=True)
|
||||||
+ self.tr("Mini T-Spins: ") + self.thousand_separated(self.mini_t_spin_total) + sep
|
+ sep
|
||||||
+ self.tr("T-Spins: ") + self.thousand_separated(self.t_spin_total) + sep
|
+ self.tr("Goal: ")
|
||||||
+ self.tr("Back-to-backs: ") + self.thousand_separated(self.nb_back_to_back) + sep
|
+ locale.format("%i", self.goal, grouping=True, monetary=True)
|
||||||
+ self.tr("Max back-to-back score: ") + self.thousand_separated(self.max_back_to_back_score) + sep
|
+ sep
|
||||||
+ self.tr("Max combo: ") + self.thousand_separated(self.max_combo) + sep
|
+ self.tr("Lines: ")
|
||||||
+ self.tr("Combos: ") + self.thousand_separated(self.combos_total)
|
+ locale.format(
|
||||||
|
"%i", self.complete_lines_total, grouping=True, monetary=True
|
||||||
|
)
|
||||||
|
+ sep
|
||||||
|
+ self.tr("Mini T-Spins: ")
|
||||||
|
+ locale.format("%i", self.mini_t_spin_total, grouping=True, monetary=True)
|
||||||
|
+ sep
|
||||||
|
+ self.tr("T-Spins: ")
|
||||||
|
+ locale.format("%i", self.t_spin_total, grouping=True, monetary=True)
|
||||||
|
+ sep
|
||||||
|
+ self.tr("Back-to-back: ")
|
||||||
|
+ locale.format("%i", self.nb_back_to_back, grouping=True, monetary=True)
|
||||||
|
+ sep
|
||||||
|
+ self.tr("Max combo: ")
|
||||||
|
+ locale.format("%i", self.max_combo, grouping=True, monetary=True)
|
||||||
|
+ sep
|
||||||
|
+ self.tr("Combos: ")
|
||||||
|
+ locale.format("%i", self.combos_total, grouping=True, monetary=True)
|
||||||
)
|
)
|
||||||
if full_stats:
|
if full_stats:
|
||||||
minutes = self.chronometer / 60 or 1
|
minutes = self.chronometer / 60
|
||||||
text += (
|
text += (
|
||||||
"\n" + sep
|
"\n"
|
||||||
|
+ sep
|
||||||
+ self.tr("Lines per minute: {:.1f}").format(
|
+ self.tr("Lines per minute: {:.1f}").format(
|
||||||
self.complete_lines_total / minutes
|
self.complete_lines_total / minutes
|
||||||
) + sep
|
)
|
||||||
|
+ sep
|
||||||
+ self.tr("Tetrominos locked down: ")
|
+ self.tr("Tetrominos locked down: ")
|
||||||
+ self.thousand_separated(self.nb_tetro)
|
+ locale.format("%i", self.nb_tetro, grouping=True, monetary=True)
|
||||||
+ sep
|
+ sep
|
||||||
+ self.tr("Tetrominos per minute: {:.1f}").format(
|
+ self.tr("Tetrominos per minute: {:.1f}").format(
|
||||||
self.nb_tetro / minutes
|
self.nb_tetro / minutes
|
||||||
@ -775,7 +768,9 @@ class Stats(QtWidgets.QWidget):
|
|||||||
+ sep
|
+ sep
|
||||||
)
|
)
|
||||||
text += sep.join(
|
text += sep.join(
|
||||||
score_type["name"] + self.tr(": ") + self.thousand_separated(nb)
|
score_type["name"]
|
||||||
|
+ self.tr(": ")
|
||||||
|
+ locale.format("%i", nb, grouping=True, monetary=True)
|
||||||
for score_type, nb in tuple(zip(consts.SCORES, self.lines_stats))[1:]
|
for score_type, nb in tuple(zip(consts.SCORES, self.lines_stats))[1:]
|
||||||
)
|
)
|
||||||
return text
|
return text
|
||||||
@ -790,9 +785,8 @@ class Frames(QtWidgets.QWidget):
|
|||||||
Manage interactions between them.
|
Manage interactions between them.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, parent, app):
|
def __init__(self, parent):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self.app = app
|
|
||||||
self.setSizePolicy(
|
self.setSizePolicy(
|
||||||
QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding
|
QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding
|
||||||
)
|
)
|
||||||
@ -802,9 +796,9 @@ class Frames(QtWidgets.QWidget):
|
|||||||
self.load_music()
|
self.load_music()
|
||||||
|
|
||||||
self.hold_queue = HoldQueue(self)
|
self.hold_queue = HoldQueue(self)
|
||||||
self.matrix = Matrix(self, app)
|
self.matrix = Matrix(self)
|
||||||
self.next_piece = Grid(self)
|
self.next_piece = Grid(self)
|
||||||
self.stats = Stats(self, app)
|
self.stats = Stats(self)
|
||||||
self.next_queue = NextQueue(self)
|
self.next_queue = NextQueue(self)
|
||||||
|
|
||||||
self.matrices = (self.hold_queue, self.matrix, self.next_piece)
|
self.matrices = (self.hold_queue, self.matrix, self.next_piece)
|
||||||
@ -852,18 +846,16 @@ class Frames(QtWidgets.QWidget):
|
|||||||
self.matrix.drop_signal.connect(self.stats.update_drop_score)
|
self.matrix.drop_signal.connect(self.stats.update_drop_score)
|
||||||
self.matrix.lock_signal.connect(self.stats.update_score)
|
self.matrix.lock_signal.connect(self.stats.update_score)
|
||||||
|
|
||||||
self.bg_image = QtGui.QImage(
|
self.set_background(
|
||||||
os.path.join(app.get_resource(consts.START_BG_IMAGE_PATH))
|
os.path.join(consts.BG_IMAGE_DIR, consts.START_BG_IMAGE_NAME)
|
||||||
)
|
)
|
||||||
self.resize_bg_image()
|
|
||||||
|
|
||||||
self.apply_settings()
|
self.apply_settings()
|
||||||
|
|
||||||
def load_music(self):
|
def load_music(self):
|
||||||
playlist = QtMultimedia.QMediaPlaylist(self)
|
playlist = QtMultimedia.QMediaPlaylist(self)
|
||||||
MUSICS_DIR = self.app.get_resource(consts.MUSICS_DIR)
|
for entry in os.scandir(consts.MUSICS_DIR):
|
||||||
for entry in os.scandir(MUSICS_DIR):
|
path = os.path.join(consts.MUSICS_DIR, entry.name)
|
||||||
path = os.path.join(MUSICS_DIR, entry.name)
|
|
||||||
url = QtCore.QUrl.fromLocalFile(path)
|
url = QtCore.QUrl.fromLocalFile(path)
|
||||||
music = QtMultimedia.QMediaContent(url)
|
music = QtMultimedia.QMediaContent(url)
|
||||||
playlist.addMedia(music)
|
playlist.addMedia(music)
|
||||||
@ -903,12 +895,15 @@ class Frames(QtWidgets.QWidget):
|
|||||||
self.resize_bg_image()
|
self.resize_bg_image()
|
||||||
|
|
||||||
def reset_backgrounds(self):
|
def reset_backgrounds(self):
|
||||||
BG_IMAGE_DIR = self.app.get_resource(consts.BG_IMAGE_DIR)
|
backgrounds_paths = (
|
||||||
backgrounds = tuple(
|
os.path.join(consts.BG_IMAGE_DIR, entry.name)
|
||||||
QtGui.QImage((os.path.join(BG_IMAGE_DIR, entry.name)))
|
for entry in os.scandir(consts.BG_IMAGE_DIR)
|
||||||
for entry in os.scandir(BG_IMAGE_DIR)
|
|
||||||
)
|
)
|
||||||
self.backgrounds_cycle = itertools.cycle(backgrounds)
|
self.backgrounds_cycle = itertools.cycle(backgrounds_paths)
|
||||||
|
|
||||||
|
def set_background(self, path):
|
||||||
|
self.bg_image = QtGui.QImage(path)
|
||||||
|
self.resize_bg_image()
|
||||||
|
|
||||||
def resize_bg_image(self):
|
def resize_bg_image(self):
|
||||||
self.resized_bg_image = QtGui.QPixmap.fromImage(self.bg_image)
|
self.resized_bg_image = QtGui.QPixmap.fromImage(self.bg_image)
|
||||||
@ -934,7 +929,7 @@ class Frames(QtWidgets.QWidget):
|
|||||||
answer = QtWidgets.QMessageBox.question(
|
answer = QtWidgets.QMessageBox.question(
|
||||||
self,
|
self,
|
||||||
self.tr("New game"),
|
self.tr("New game"),
|
||||||
self.tr("A game is in progress.\nDo you want to abord it?"),
|
self.tr("A game is in progress.\n" "Do you want to abord it?"),
|
||||||
QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel,
|
QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel,
|
||||||
QtWidgets.QMessageBox.Cancel,
|
QtWidgets.QMessageBox.Cancel,
|
||||||
)
|
)
|
||||||
@ -970,8 +965,7 @@ class Frames(QtWidgets.QWidget):
|
|||||||
self.new_piece()
|
self.new_piece()
|
||||||
|
|
||||||
def new_level(self):
|
def new_level(self):
|
||||||
self.bg_image = QtGui.QImage(next(self.backgrounds_cycle))
|
self.set_background(next(self.backgrounds_cycle))
|
||||||
self.resize_bg_image()
|
|
||||||
level = self.stats.new_level()
|
level = self.stats.new_level()
|
||||||
self.matrix.new_level(level)
|
self.matrix.new_level(level)
|
||||||
|
|
||||||
@ -979,6 +973,7 @@ class Frames(QtWidgets.QWidget):
|
|||||||
if self.stats.goal <= 0:
|
if self.stats.goal <= 0:
|
||||||
self.new_level()
|
self.new_level()
|
||||||
self.matrix.insert(self.next_piece.piece)
|
self.matrix.insert(self.next_piece.piece)
|
||||||
|
self.matrix.lock_wait()
|
||||||
self.next_piece.insert(self.next_queue.pieces[0])
|
self.next_piece.insert(self.next_queue.pieces[0])
|
||||||
self.next_queue.new_piece()
|
self.next_queue.new_piece()
|
||||||
self.hold_enabled = settings[s.OTHER][s.HOLD_ENABLED]
|
self.hold_enabled = settings[s.OTHER][s.HOLD_ENABLED]
|
||||||
@ -1225,21 +1220,21 @@ class SettingsDialog(QtWidgets.QDialog):
|
|||||||
class Window(QtWidgets.QMainWindow):
|
class Window(QtWidgets.QMainWindow):
|
||||||
""" Main window """
|
""" Main window """
|
||||||
|
|
||||||
def __init__(self, app):
|
def __init__(self):
|
||||||
splash_screen = QtWidgets.QSplashScreen(
|
splash_screen = QtWidgets.QSplashScreen(
|
||||||
QtGui.QPixmap(app.get_resource(consts.SPLASH_SCREEN_PATH))
|
QtGui.QPixmap(consts.SPLASH_SCREEN_PATH)
|
||||||
)
|
)
|
||||||
splash_screen.show()
|
splash_screen.show()
|
||||||
|
|
||||||
|
self.set_locale()
|
||||||
|
|
||||||
|
self.load_settings()
|
||||||
|
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.setWindowTitle(__title__.upper())
|
self.setWindowTitle(__title__.upper())
|
||||||
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
|
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
|
||||||
|
|
||||||
self.set_locale(app)
|
self.setWindowIcon(QtGui.QIcon(consts.ICON_PATH))
|
||||||
|
|
||||||
self.load_settings()
|
|
||||||
|
|
||||||
self.setWindowIcon(app.app_icon)
|
|
||||||
# Windows' taskbar icon
|
# Windows' taskbar icon
|
||||||
try:
|
try:
|
||||||
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(
|
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(
|
||||||
@ -1254,14 +1249,16 @@ class Window(QtWidgets.QMainWindow):
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
os.environ['QT_API'] = 'pyqt5'
|
|
||||||
self.setStyleSheet(qdarkstyle.load_stylesheet_from_environment())
|
self.setStyleSheet(qdarkstyle.load_stylesheet_from_environment())
|
||||||
|
|
||||||
for font_path in consts.STATS_FONT_PATH, consts.MATRIX_FONT_PATH:
|
for font_path in consts.STATS_FONT_PATH, consts.MATRIX_FONT_PATH:
|
||||||
QtGui.QFontDatabase.addApplicationFont(app.get_resource(font_path))
|
QtGui.QFontDatabase.addApplicationFont(font_path)
|
||||||
|
|
||||||
self.frames = Frames(self, app)
|
self.frames = Frames(self)
|
||||||
self.setCentralWidget(self.frames)
|
self.setCentralWidget(self.frames)
|
||||||
|
self.hold_queue = self.frames.hold_queue
|
||||||
|
self.matrix = self.frames.matrix
|
||||||
|
self.stats = self.frames.stats
|
||||||
|
|
||||||
self.menu = self.menuBar()
|
self.menu = self.menuBar()
|
||||||
|
|
||||||
@ -1278,28 +1275,24 @@ class Window(QtWidgets.QMainWindow):
|
|||||||
|
|
||||||
splash_screen.finish(self)
|
splash_screen.finish(self)
|
||||||
|
|
||||||
def show(self):
|
def set_locale(self):
|
||||||
super().show()
|
app = QtWidgets.QApplication.instance()
|
||||||
self.frames.new_game()
|
|
||||||
|
|
||||||
def set_locale(self, app):
|
|
||||||
qapp = QtWidgets.QApplication.instance()
|
|
||||||
|
|
||||||
# Set appropriate thounsand separator characters
|
# Set appropriate thounsand separator characters
|
||||||
locale.setlocale(locale.LC_ALL, "")
|
locale.setlocale(locale.LC_ALL, "")
|
||||||
# Qt
|
# Qt
|
||||||
language = QtCore.QLocale.system().name()[:2]
|
language = QtCore.QLocale.system().name()[:2]
|
||||||
|
|
||||||
qt_translator = QtCore.QTranslator(qapp)
|
qt_translator = QtCore.QTranslator(app)
|
||||||
qt_translation_path = QtCore.QLibraryInfo.location(
|
qt_translation_path = QtCore.QLibraryInfo.location(
|
||||||
QtCore.QLibraryInfo.TranslationsPath
|
QtCore.QLibraryInfo.TranslationsPath
|
||||||
)
|
)
|
||||||
if qt_translator.load("qt_" + language, qt_translation_path):
|
if qt_translator.load("qt_" + language, qt_translation_path):
|
||||||
qapp.installTranslator(qt_translator)
|
app.installTranslator(qt_translator)
|
||||||
|
|
||||||
tetris2000_translator = QtCore.QTranslator(qapp)
|
tetris2000_translator = QtCore.QTranslator(app)
|
||||||
if tetris2000_translator.load(language, app.get_resource(consts.LOCALE_PATH)):
|
if tetris2000_translator.load(language, consts.LOCALE_PATH):
|
||||||
qapp.installTranslator(tetris2000_translator)
|
app.installTranslator(tetris2000_translator)
|
||||||
|
|
||||||
def load_settings(self):
|
def load_settings(self):
|
||||||
global s
|
global s
|
||||||
@ -1521,7 +1514,7 @@ Sound effects made with voc-one by Simple-Media"""
|
|||||||
self.frames.music.stop()
|
self.frames.music.stop()
|
||||||
|
|
||||||
# Save settings
|
# Save settings
|
||||||
qsettings.setValue(self.tr("High score"), self.frames.stats.high_score)
|
qsettings.setValue(self.tr("High score"), self.stats.high_score)
|
||||||
qsettings.setValue("WindowGeometry", self.saveGeometry())
|
qsettings.setValue("WindowGeometry", self.saveGeometry())
|
||||||
qsettings.setValue("WindowState", int(self.windowState()))
|
qsettings.setValue("WindowState", int(self.windowState()))
|
||||||
|
|
@ -2,9 +2,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
from PyQt5 import QtCore
|
from qtpy import QtCore
|
||||||
|
|
||||||
from consts import CLOCKWISE
|
from .consts import CLOCKWISE
|
||||||
|
|
||||||
|
|
||||||
class Point(QtCore.QPoint):
|
class Point(QtCore.QPoint):
|
@ -3,10 +3,133 @@
|
|||||||
|
|
||||||
|
|
||||||
import random
|
import random
|
||||||
|
from qtpy import QtCore, QtGui
|
||||||
|
|
||||||
from consts import L, R, U, D, CLOCKWISE, COUNTERCLOCKWISE
|
from . import consts
|
||||||
from point import Point
|
from .consts import L, R, U, D, CLOCKWISE, COUNTERCLOCKWISE
|
||||||
from block import Block, GhostBlock
|
from .point import Point
|
||||||
|
|
||||||
|
|
||||||
|
class Block:
|
||||||
|
"""
|
||||||
|
Mino or block
|
||||||
|
Mino : A single square-shaped building block of a shape called a Tetrimino.
|
||||||
|
Four Minos arranged into any of their various connected patterns is known as a Tetrimino
|
||||||
|
Block : A single block locked in a cell in the Grid
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Colors
|
||||||
|
BORDER_COLOR = consts.BLOCK_BORDER_COLOR
|
||||||
|
FILL_COLOR = consts.BLOCK_FILL_COLOR
|
||||||
|
GLOWING_BORDER_COLOR = consts.BLOCK_GLOWING_BORDER_COLOR
|
||||||
|
GLOWING_FILL_COLOR = consts.BLOCK_GLOWING_FILL_COLOR
|
||||||
|
LIGHT_COLOR = consts.BLOCK_LIGHT_COLOR
|
||||||
|
TRANSPARENT = consts.BLOCK_TRANSPARENT
|
||||||
|
GLOWING = consts.BLOCK_GLOWING
|
||||||
|
|
||||||
|
side = consts.BLOCK_INITIAL_SIDE
|
||||||
|
|
||||||
|
def __init__(self, coord, trail=0):
|
||||||
|
self.coord = coord
|
||||||
|
self.trail = trail
|
||||||
|
self.border_color = self.BORDER_COLOR
|
||||||
|
self.fill_color = self.FILL_COLOR
|
||||||
|
self.glowing = self.GLOWING
|
||||||
|
|
||||||
|
def paint(self, painter, top_left_corner, spotlight):
|
||||||
|
p = top_left_corner + self.coord * Block.side
|
||||||
|
block_center = Point(Block.side / 2, Block.side / 2)
|
||||||
|
self.center = p + block_center
|
||||||
|
spotlight = top_left_corner + Block.side * spotlight + block_center
|
||||||
|
self.glint = 0.15 * spotlight + 0.85 * self.center
|
||||||
|
|
||||||
|
if self.trail:
|
||||||
|
start = (
|
||||||
|
top_left_corner + (self.coord + Point(0, self.trail * U)) * Block.side
|
||||||
|
)
|
||||||
|
stop = top_left_corner + (self.coord + Point(0, 2 * D)) * Block.side
|
||||||
|
fill = QtGui.QLinearGradient(start, stop)
|
||||||
|
fill.setColorAt(0, self.LIGHT_COLOR)
|
||||||
|
fill.setColorAt(1, self.GLOWING_FILL_COLOR)
|
||||||
|
painter.setBrush(fill)
|
||||||
|
painter.setPen(QtCore.Qt.NoPen)
|
||||||
|
painter.drawRoundedRect(
|
||||||
|
start.x,
|
||||||
|
start.y,
|
||||||
|
Block.side,
|
||||||
|
Block.side * (1 + self.trail),
|
||||||
|
20,
|
||||||
|
20,
|
||||||
|
QtCore.Qt.RelativeSize,
|
||||||
|
)
|
||||||
|
|
||||||
|
if self.glowing:
|
||||||
|
fill = QtGui.QRadialGradient(self.center, self.glowing * Block.side)
|
||||||
|
fill.setColorAt(0, self.TRANSPARENT)
|
||||||
|
fill.setColorAt(0.5 / self.glowing, self.LIGHT_COLOR)
|
||||||
|
fill.setColorAt(1, self.TRANSPARENT)
|
||||||
|
painter.setBrush(QtGui.QBrush(fill))
|
||||||
|
painter.setPen(QtCore.Qt.NoPen)
|
||||||
|
painter.drawEllipse(
|
||||||
|
self.center.x - self.glowing * Block.side,
|
||||||
|
self.center.y - self.glowing * Block.side,
|
||||||
|
2 * self.glowing * Block.side,
|
||||||
|
2 * self.glowing * Block.side,
|
||||||
|
)
|
||||||
|
|
||||||
|
painter.setBrush(self.brush())
|
||||||
|
painter.setPen(self.pen())
|
||||||
|
painter.drawRoundedRect(
|
||||||
|
p.x + 1,
|
||||||
|
p.y + 1,
|
||||||
|
Block.side - 2,
|
||||||
|
Block.side - 2,
|
||||||
|
20,
|
||||||
|
20,
|
||||||
|
QtCore.Qt.RelativeSize,
|
||||||
|
)
|
||||||
|
|
||||||
|
def brush(self):
|
||||||
|
if self.fill_color is None:
|
||||||
|
return QtCore.Qt.NoBrush
|
||||||
|
|
||||||
|
fill = QtGui.QRadialGradient(self.glint, 1.5 * Block.side)
|
||||||
|
fill.setColorAt(0, self.fill_color.lighter())
|
||||||
|
fill.setColorAt(1, self.fill_color)
|
||||||
|
return QtGui.QBrush(fill)
|
||||||
|
|
||||||
|
def pen(self):
|
||||||
|
if self.border_color is None:
|
||||||
|
return QtCore.Qt.NoPen
|
||||||
|
|
||||||
|
border = QtGui.QRadialGradient(self.glint, Block.side)
|
||||||
|
border.setColorAt(0, self.border_color.lighter())
|
||||||
|
border.setColorAt(1, self.border_color.darker())
|
||||||
|
return QtGui.QPen(QtGui.QBrush(border), 1, join=QtCore.Qt.RoundJoin)
|
||||||
|
|
||||||
|
def shine(self, glowing=2, delay=None):
|
||||||
|
self.border_color = Block.GLOWING_BORDER_COLOR
|
||||||
|
self.fill_color = Block.GLOWING_FILL_COLOR
|
||||||
|
self.glowing = glowing
|
||||||
|
if delay:
|
||||||
|
QtCore.QTimer.singleShot(delay, self.fade)
|
||||||
|
|
||||||
|
def fade(self):
|
||||||
|
self.border_color = Block.BORDER_COLOR
|
||||||
|
self.fill_color = Block.FILL_COLOR
|
||||||
|
self.glowing = 0
|
||||||
|
self.trail = 0
|
||||||
|
|
||||||
|
|
||||||
|
class GhostBlock(Block):
|
||||||
|
"""
|
||||||
|
Mino of the ghost piece
|
||||||
|
"""
|
||||||
|
|
||||||
|
BORDER_COLOR = consts.GHOST_BLOCK_BORDER_COLOR
|
||||||
|
FILL_COLOR = consts.GHOST_BLOCK_FILL_COLOR
|
||||||
|
GLOWING_FILL_COLOR = consts.GHOST_BLOCK_GLOWING_FILL_COLOR
|
||||||
|
GLOWING = consts.GHOST_BLOCK_GLOWING
|
||||||
|
|
||||||
|
|
||||||
class MetaTetro(type):
|
class MetaTetro(type):
|
||||||
@ -70,8 +193,7 @@ class Tetromino:
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.orientation = 0
|
self.orientation = 0
|
||||||
self.rotation_point_5_used = False
|
self.t_spin = ""
|
||||||
self.rotated_last = False
|
|
||||||
|
|
||||||
def insert_into(self, matrix, position):
|
def insert_into(self, matrix, position):
|
||||||
self.matrix = matrix
|
self.matrix = matrix
|
||||||
@ -109,15 +231,11 @@ class Tetromino:
|
|||||||
Movement into occupied cells and Matrix walls and floors is not allowed
|
Movement into occupied cells and Matrix walls and floors is not allowed
|
||||||
Update the Grid if there is no drop trail
|
Update the Grid if there is no drop trail
|
||||||
"""
|
"""
|
||||||
if self._try_movement(
|
return self._try_movement(
|
||||||
(block.coord + Point(horizontally, vertically) for block in self.minoes),
|
(block.coord + Point(horizontally, vertically) for block in self.minoes),
|
||||||
trail,
|
trail,
|
||||||
update
|
update
|
||||||
):
|
)
|
||||||
self.rotated_last = False
|
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
def rotate(self, direction=CLOCKWISE):
|
def rotate(self, direction=CLOCKWISE):
|
||||||
"""
|
"""
|
||||||
@ -135,12 +253,9 @@ class Tetromino:
|
|||||||
mino.coord.rotate(self.minoes[0].coord, direction) for mino in self.minoes
|
mino.coord.rotate(self.minoes[0].coord, direction) for mino in self.minoes
|
||||||
)
|
)
|
||||||
|
|
||||||
for rotation_point, movement in enumerate(self.SUPER_ROTATION_SYSTEM[self.orientation][direction]):
|
for movement in self.SUPER_ROTATION_SYSTEM[self.orientation][direction]:
|
||||||
if self._try_movement(coord + Point(*movement) for coord in rotated_coords):
|
if self._try_movement(coord + Point(*movement) for coord in rotated_coords):
|
||||||
self.orientation = (self.orientation + direction) % 4
|
self.orientation = (self.orientation + direction) % 4
|
||||||
self.rotated_last = True
|
|
||||||
if rotation_point == 4:
|
|
||||||
self.rotation_point_5_used = True
|
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@ -163,9 +278,6 @@ class Tetromino:
|
|||||||
trail += 1
|
trail += 1
|
||||||
return trail
|
return trail
|
||||||
|
|
||||||
def t_spin(self):
|
|
||||||
return ""
|
|
||||||
|
|
||||||
|
|
||||||
class TetroI(Tetromino, metaclass=MetaTetro):
|
class TetroI(Tetromino, metaclass=MetaTetro):
|
||||||
"""
|
"""
|
||||||
@ -173,7 +285,7 @@ class TetroI(Tetromino, metaclass=MetaTetro):
|
|||||||
four minoes in a straight line
|
four minoes in a straight line
|
||||||
"""
|
"""
|
||||||
|
|
||||||
COORDS = (0, 0), (L, 0), (R, 0), (2 * R, 0)
|
COORDS = (L, 0), (2 * L, 0), (0, 0), (R, 0)
|
||||||
SUPER_ROTATION_SYSTEM = (
|
SUPER_ROTATION_SYSTEM = (
|
||||||
{
|
{
|
||||||
COUNTERCLOCKWISE: ((0, D), (L, D), (2 * R, D), (L, U), (2 * R, 2 * D)),
|
COUNTERCLOCKWISE: ((0, D), (L, D), (2 * R, D), (L, U), (2 * R, 2 * D)),
|
||||||
@ -202,13 +314,15 @@ class TetroT(Tetromino, metaclass=MetaTetro):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
COORDS = (0, 0), (L, 0), (0, U), (R, 0)
|
COORDS = (0, 0), (L, 0), (0, U), (R, 0)
|
||||||
|
T_SLOT_A = ((L, U), (R, U), (R, D), (L, D))
|
||||||
T_SLOT = ((L, U), (R, U), (R, D), (L, D))
|
T_SLOT_B = ((R, U), (R, D), (L, D), (L, U))
|
||||||
|
T_SLOT_C = ((L, D), (L, U), (R, U), (R, D))
|
||||||
|
T_SLOT_D = ((R, D), (L, D), (L, U), (R, U))
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
def t_spin(self):
|
def rotate(self, direction=CLOCKWISE):
|
||||||
"""
|
"""
|
||||||
Detects T-Spins:
|
Detects T-Spins:
|
||||||
this action can be achieved by first landing a T-Tetrimino,
|
this action can be achieved by first landing a T-Tetrimino,
|
||||||
@ -217,17 +331,13 @@ class TetroT(Tetromino, metaclass=MetaTetro):
|
|||||||
any three of the four cells diagonally adjacent to the center of self
|
any three of the four cells diagonally adjacent to the center of self
|
||||||
are occupied by existing Blocks.)
|
are occupied by existing Blocks.)
|
||||||
"""
|
"""
|
||||||
if not self.rotated_last:
|
rotated = super().rotate(direction)
|
||||||
return ""
|
if rotated:
|
||||||
|
|
||||||
if self.rotation_point_5_used:
|
|
||||||
return "T-Spin"
|
|
||||||
|
|
||||||
center = self.minoes[0].coord
|
center = self.minoes[0].coord
|
||||||
pa = center + Point(*self.T_SLOT[self.orientation])
|
pa = center + Point(*self.T_SLOT_A[self.orientation])
|
||||||
pb = center + Point(*self.T_SLOT[(self.orientation+1)%4])
|
pb = center + Point(*self.T_SLOT_B[self.orientation])
|
||||||
pc = center + Point(*self.T_SLOT[(self.orientation+2)%4])
|
pc = center + Point(*self.T_SLOT_C[self.orientation])
|
||||||
pd = center + Point(*self.T_SLOT[(self.orientation+3)%4])
|
pd = center + Point(*self.T_SLOT_D[self.orientation])
|
||||||
|
|
||||||
a = not self.matrix.is_empty_cell(pa)
|
a = not self.matrix.is_empty_cell(pa)
|
||||||
b = not self.matrix.is_empty_cell(pb)
|
b = not self.matrix.is_empty_cell(pb)
|
||||||
@ -235,11 +345,10 @@ class TetroT(Tetromino, metaclass=MetaTetro):
|
|||||||
d = not self.matrix.is_empty_cell(pd)
|
d = not self.matrix.is_empty_cell(pd)
|
||||||
|
|
||||||
if a and b and (c or d):
|
if a and b and (c or d):
|
||||||
return "T-Spin"
|
self.t_spin = "T-Spin"
|
||||||
elif c and d and (a or b):
|
elif c and d and (a or b):
|
||||||
return "Mini T-Spin"
|
self.t_spin = "Mini T-Spin"
|
||||||
else:
|
return rotated
|
||||||
return ""
|
|
||||||
|
|
||||||
|
|
||||||
class TetroZ(Tetromino, metaclass=MetaTetro):
|
class TetroZ(Tetromino, metaclass=MetaTetro):
|
||||||
@ -284,7 +393,7 @@ class TetroO(Tetromino, metaclass=MetaTetro):
|
|||||||
four minoes in a 2×2 square.
|
four minoes in a 2×2 square.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
COORDS = (R, 0), (0, 0), (R, U), (0, U)
|
COORDS = (0, 0), (L, 0), (0, U), (L, U)
|
||||||
|
|
||||||
def rotate(self, direction=1):
|
def rotate(self, direction=1):
|
||||||
""" irrelevant """
|
""" irrelevant """
|
@ -1,101 +0,0 @@
|
|||||||
!include MUI2.nsh
|
|
||||||
!include FileFunc.nsh
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Perform Machine-level install, if possible
|
|
||||||
|
|
||||||
!define MULTIUSER_EXECUTIONLEVEL Highest
|
|
||||||
;Add support for command-line args that let uninstaller know whether to
|
|
||||||
;uninstall machine- or user installation:
|
|
||||||
!define MULTIUSER_INSTALLMODE_COMMANDLINE
|
|
||||||
!include MultiUser.nsh
|
|
||||||
!include LogicLib.nsh
|
|
||||||
|
|
||||||
Function .onInit
|
|
||||||
!insertmacro MULTIUSER_INIT
|
|
||||||
;Do not use InstallDir at all so we can detect empty $InstDir!
|
|
||||||
${If} $InstDir == "" ; /D not used
|
|
||||||
${If} $MultiUser.InstallMode == "AllUsers"
|
|
||||||
StrCpy $InstDir "$PROGRAMFILES\%{app_name}"
|
|
||||||
${Else}
|
|
||||||
StrCpy $InstDir "$LOCALAPPDATA\%{app_name}"
|
|
||||||
${EndIf}
|
|
||||||
${EndIf}
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
Function un.onInit
|
|
||||||
!insertmacro MULTIUSER_UNINIT
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;General
|
|
||||||
|
|
||||||
Name "%{app_name}"
|
|
||||||
OutFile "..\%{app_name}Setup.exe"
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Interface Settings
|
|
||||||
|
|
||||||
!define MUI_ABORTWARNING
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Pages
|
|
||||||
|
|
||||||
!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of %{app_name}.$\r$\n$\r$\n$\r$\nClick Next to continue."
|
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
|
||||||
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
|
||||||
!define MUI_FINISHPAGE_RUN
|
|
||||||
!define MUI_FINISHPAGE_RUN_CHECKED
|
|
||||||
!define MUI_FINISHPAGE_RUN_TEXT "Run %{app_name}"
|
|
||||||
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
|
|
||||||
!insertmacro MUI_PAGE_FINISH
|
|
||||||
|
|
||||||
!insertmacro MUI_UNPAGE_CONFIRM
|
|
||||||
!insertmacro MUI_UNPAGE_INSTFILES
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Languages
|
|
||||||
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Installer Sections
|
|
||||||
|
|
||||||
!define UNINST_KEY \
|
|
||||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\%{app_name}"
|
|
||||||
Section
|
|
||||||
SetOutPath "$InstDir"
|
|
||||||
File /r "..\%{app_name}\*"
|
|
||||||
WriteRegStr SHCTX "Software\%{app_name}" "" $InstDir
|
|
||||||
WriteUninstaller "$InstDir\uninstall.exe"
|
|
||||||
CreateShortCut "$SMPROGRAMS\%{app_name}.lnk" "$InstDir\%{app_name}.exe"
|
|
||||||
WriteRegStr SHCTX "${UNINST_KEY}" "DisplayName" "%{app_name}"
|
|
||||||
WriteRegStr SHCTX "${UNINST_KEY}" "UninstallString" \
|
|
||||||
"$\"$InstDir\uninstall.exe$\" /$MultiUser.InstallMode"
|
|
||||||
WriteRegStr SHCTX "${UNINST_KEY}" "QuietUninstallString" \
|
|
||||||
"$\"$InstDir\uninstall.exe$\" /$MultiUser.InstallMode /S"
|
|
||||||
WriteRegStr SHCTX "${UNINST_KEY}" "Publisher" "%{author}"
|
|
||||||
${GetSize} "$InstDir" "/S=0K" $0 $1 $2
|
|
||||||
IntFmt $0 "0x%08X" $0
|
|
||||||
WriteRegDWORD SHCTX "${UNINST_KEY}" "EstimatedSize" "$0"
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Uninstaller Section
|
|
||||||
|
|
||||||
Section "Uninstall"
|
|
||||||
|
|
||||||
RMDir /r "$InstDir"
|
|
||||||
Delete "$SMPROGRAMS\%{app_name}.lnk"
|
|
||||||
DeleteRegKey /ifempty SHCTX "Software\%{app_name}"
|
|
||||||
DeleteRegKey SHCTX "${UNINST_KEY}"
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
Function LaunchLink
|
|
||||||
!addplugindir "."
|
|
||||||
ShellExecAsUser::ShellExecAsUser "open" "$SMPROGRAMS\%{app_name}.lnk"
|
|
||||||
FunctionEnd
|
|
@ -1,11 +0,0 @@
|
|||||||

|
|
||||||
|
|
||||||
This directory contains the icons that are displayed for your app. Feel free to
|
|
||||||
change them.
|
|
||||||
|
|
||||||
The difference between the icons on Mac and the other platforms is that on Mac,
|
|
||||||
they contain a ~5% transparent margin. This is because otherwise they look too
|
|
||||||
big (eg. in the Dock or in the app switcher).
|
|
||||||
|
|
||||||
You can create Icon.ico from the .png files with
|
|
||||||
[an online tool](http://icoconvert.com/Multi_Image_to_one_icon/).
|
|
Before Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 802 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 802 B |
Before Width: | Height: | Size: 1.3 KiB |
@ -1,131 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtGui
|
|
||||||
|
|
||||||
import consts
|
|
||||||
from consts import U, D
|
|
||||||
from point import Point
|
|
||||||
|
|
||||||
|
|
||||||
class Block:
|
|
||||||
"""
|
|
||||||
Mino or block
|
|
||||||
Mino : A single square-shaped building block of a shape called a Tetrimino.
|
|
||||||
Four Minos arranged into any of their various connected patterns is known as a Tetrimino
|
|
||||||
Block : A single block locked in a cell in the Grid
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Colors
|
|
||||||
BORDER_COLOR = consts.BLOCK_BORDER_COLOR
|
|
||||||
FILL_COLOR = consts.BLOCK_FILL_COLOR
|
|
||||||
GLOWING_BORDER_COLOR = consts.BLOCK_GLOWING_BORDER_COLOR
|
|
||||||
GLOWING_FILL_COLOR = consts.BLOCK_GLOWING_FILL_COLOR
|
|
||||||
LIGHT_COLOR = consts.BLOCK_LIGHT_COLOR
|
|
||||||
TRANSPARENT = consts.BLOCK_TRANSPARENT
|
|
||||||
GLOWING = consts.BLOCK_GLOWING
|
|
||||||
|
|
||||||
side = consts.BLOCK_INITIAL_SIDE
|
|
||||||
|
|
||||||
def __init__(self, coord, trail=0):
|
|
||||||
self.coord = coord
|
|
||||||
self.trail = trail
|
|
||||||
self.border_color = self.BORDER_COLOR
|
|
||||||
self.fill_color = self.FILL_COLOR
|
|
||||||
self.glowing = self.GLOWING
|
|
||||||
|
|
||||||
def paint(self, painter, top_left_corner, spotlight):
|
|
||||||
p = top_left_corner + self.coord * Block.side
|
|
||||||
block_center = Point(Block.side / 2, Block.side / 2)
|
|
||||||
self.center = p + block_center
|
|
||||||
spotlight = top_left_corner + Block.side * spotlight + block_center
|
|
||||||
self.glint = 0.15 * spotlight + 0.85 * self.center
|
|
||||||
|
|
||||||
if self.trail:
|
|
||||||
start = (
|
|
||||||
top_left_corner + (self.coord + Point(0, self.trail * U)) * Block.side
|
|
||||||
)
|
|
||||||
stop = top_left_corner + (self.coord + Point(0, 2 * D)) * Block.side
|
|
||||||
fill = QtGui.QLinearGradient(start, stop)
|
|
||||||
fill.setColorAt(0, self.LIGHT_COLOR)
|
|
||||||
fill.setColorAt(1, self.GLOWING_FILL_COLOR)
|
|
||||||
painter.setBrush(fill)
|
|
||||||
painter.setPen(QtCore.Qt.NoPen)
|
|
||||||
painter.drawRoundedRect(
|
|
||||||
start.x,
|
|
||||||
start.y,
|
|
||||||
Block.side,
|
|
||||||
Block.side * (1 + self.trail),
|
|
||||||
20,
|
|
||||||
20,
|
|
||||||
QtCore.Qt.RelativeSize,
|
|
||||||
)
|
|
||||||
|
|
||||||
if self.glowing:
|
|
||||||
fill = QtGui.QRadialGradient(self.center, self.glowing * Block.side)
|
|
||||||
fill.setColorAt(0, self.TRANSPARENT)
|
|
||||||
fill.setColorAt(0.5 / self.glowing, self.LIGHT_COLOR)
|
|
||||||
fill.setColorAt(1, self.TRANSPARENT)
|
|
||||||
painter.setBrush(QtGui.QBrush(fill))
|
|
||||||
painter.setPen(QtCore.Qt.NoPen)
|
|
||||||
painter.drawEllipse(
|
|
||||||
self.center.x - self.glowing * Block.side,
|
|
||||||
self.center.y - self.glowing * Block.side,
|
|
||||||
2 * self.glowing * Block.side,
|
|
||||||
2 * self.glowing * Block.side,
|
|
||||||
)
|
|
||||||
|
|
||||||
painter.setBrush(self.brush())
|
|
||||||
painter.setPen(self.pen())
|
|
||||||
painter.drawRoundedRect(
|
|
||||||
p.x + 1,
|
|
||||||
p.y + 1,
|
|
||||||
Block.side - 2,
|
|
||||||
Block.side - 2,
|
|
||||||
20,
|
|
||||||
20,
|
|
||||||
QtCore.Qt.RelativeSize,
|
|
||||||
)
|
|
||||||
|
|
||||||
def brush(self):
|
|
||||||
if self.fill_color is None:
|
|
||||||
return QtCore.Qt.NoBrush
|
|
||||||
|
|
||||||
fill = QtGui.QRadialGradient(self.glint, 1.5 * Block.side)
|
|
||||||
fill.setColorAt(0, self.fill_color.lighter())
|
|
||||||
fill.setColorAt(1, self.fill_color)
|
|
||||||
return QtGui.QBrush(fill)
|
|
||||||
|
|
||||||
def pen(self):
|
|
||||||
if self.border_color is None:
|
|
||||||
return QtCore.Qt.NoPen
|
|
||||||
|
|
||||||
border = QtGui.QRadialGradient(self.glint, Block.side)
|
|
||||||
border.setColorAt(0, self.border_color.lighter())
|
|
||||||
border.setColorAt(1, self.border_color.darker())
|
|
||||||
return QtGui.QPen(QtGui.QBrush(border), 1, join=QtCore.Qt.RoundJoin)
|
|
||||||
|
|
||||||
def shine(self, glowing=2, delay=None):
|
|
||||||
self.border_color = Block.GLOWING_BORDER_COLOR
|
|
||||||
self.fill_color = Block.GLOWING_FILL_COLOR
|
|
||||||
self.glowing = glowing
|
|
||||||
if delay:
|
|
||||||
QtCore.QTimer.singleShot(delay, self.fade)
|
|
||||||
|
|
||||||
def fade(self):
|
|
||||||
self.border_color = Block.BORDER_COLOR
|
|
||||||
self.fill_color = Block.FILL_COLOR
|
|
||||||
self.glowing = 0
|
|
||||||
self.trail = 0
|
|
||||||
|
|
||||||
|
|
||||||
class GhostBlock(Block):
|
|
||||||
"""
|
|
||||||
Mino of the ghost piece
|
|
||||||
"""
|
|
||||||
|
|
||||||
BORDER_COLOR = consts.GHOST_BLOCK_BORDER_COLOR
|
|
||||||
FILL_COLOR = consts.GHOST_BLOCK_FILL_COLOR
|
|
||||||
GLOWING_FILL_COLOR = consts.GHOST_BLOCK_GLOWING_FILL_COLOR
|
|
||||||
GLOWING = consts.GHOST_BLOCK_GLOWING
|
|
@ -1,25 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
"""
|
|
||||||
Another TETRIS® clone
|
|
||||||
Tetris Game Design by Alexey Pajitnov.
|
|
||||||
Parts of comments issued from 2009 Tetris Design Guideline
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from fbs_runtime.application_context import ApplicationContext
|
|
||||||
from game_gui import Window
|
|
||||||
|
|
||||||
class AppContext(ApplicationContext): # 1. Subclass ApplicationContext
|
|
||||||
def run(self): # 2. Implement run()
|
|
||||||
win = Window(self)
|
|
||||||
win.show()
|
|
||||||
return self.app.exec_() # 3. End run() with this line
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
app = AppContext() # 4. Instantiate the subclass
|
|
||||||
exit_code = app.run() # 5. Invoke run()
|
|
||||||
sys.exit(exit_code)
|
|
@ -1,3 +0,0 @@
|
|||||||
for /F %%n in ('dir /B *.ts') do pylupdate5 -verbose ..\..\..\python\game_gui.py -ts %%n
|
|
||||||
echo You may need to edit *.ts files with a text editor to correct special characters
|
|
||||||
pause
|
|
@ -1,3 +0,0 @@
|
|||||||
for /F %%n in ('dir /B *.ts') do pylupdate5 -verbose ..\..\..\python\game_gui.py -ts -noobsolete %%n
|
|
||||||
echo You may need to edit *.ts files with a text editor to correct special characters
|
|
||||||
pause
|
|
@ -1,29 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>${app_name}</string>
|
|
||||||
<key>CFBundleDisplayName</key>
|
|
||||||
<string>${app_name}</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleIconFile</key>
|
|
||||||
<string>Icon.icns</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>${mac_bundle_identifier}</string>
|
|
||||||
<key>LSBackgroundOnly</key>
|
|
||||||
<string>0</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>${version}</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>${version}</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>${app_name}</string>
|
|
||||||
<!-- Enable Retina support on OS X: -->
|
|
||||||
<key>NSPrincipalClass</key>
|
|
||||||
<string>NSApplication</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|