Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyUNO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Kirsch
PyUNO
Commits
ab972c40
Commit
ab972c40
authored
5 years ago
by
Jakob Kirsch
Browse files
Options
Downloads
Patches
Plain Diff
auto generated by makefile
parent
7ca14dd6
Branches
master
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
uno.py
+15
-14
15 additions, 14 deletions
uno.py
with
15 additions
and
14 deletions
uno.py
+
15
−
14
View file @
ab972c40
...
@@ -58,17 +58,18 @@ if not DEBUG:
...
@@ -58,17 +58,18 @@ if not DEBUG:
#cards
#cards
for
color
in
COLORS
:
for
i
in
range
(
0
,
64
):
for
n
in
range
(
0
,
20
):
for
color
in
COLORS
:
CARDS
.
append
((
str
(
n
%
10
),
color
))
for
n
in
range
(
0
,
20
):
for
n
in
range
(
0
,
2
):
CARDS
.
append
((
str
(
n
%
10
),
color
))
CARDS
.
append
((
"
+2
"
,
color
))
for
n
in
range
(
0
,
2
):
CARDS
.
append
([
"
C
"
,
"
NEUTRAL
"
])
CARDS
.
append
((
"
+2
"
,
color
))
CARDS
.
append
([
"
+4
"
,
"
NEUTRAL
"
])
CARDS
.
append
([
"
C
"
,
"
NEUTRAL
"
])
CARDS
.
append
((
"
R
"
,
color
))
CARDS
.
append
([
"
+4
"
,
"
NEUTRAL
"
])
for
n
in
range
(
0
,
2
):
CARDS
.
append
((
"
R
"
,
color
))
CARDS
.
append
((
"
X
"
,
color
))
for
n
in
range
(
0
,
2
):
CARDS
.
append
((
"
Marvin
"
,
color
))
CARDS
.
append
((
"
X
"
,
color
))
CARDS
.
append
((
"
Marvin
"
,
color
))
#players
#players
p
=
input
(
"
Player:
"
)
p
=
input
(
"
Player:
"
)
while
p
!=
""
:
while
p
!=
""
:
...
@@ -77,7 +78,7 @@ while p != "":
...
@@ -77,7 +78,7 @@ while p != "":
#get cards
#get cards
random
.
seed
(
int
(
hashlib
.
md5
(
input
(
"
Enter something:
"
).
encode
()).
hexdigest
(),
16
))
random
.
seed
(
int
(
hashlib
.
md5
(
input
(
"
Enter something:
"
).
encode
()).
hexdigest
(),
16
))
random
.
shuffle
(
CARDS
)
random
.
shuffle
(
CARDS
)
#
random.shuffle(PLAYERS)
random
.
shuffle
(
PLAYERS
)
PCARDS
=
{}
PCARDS
=
{}
...
@@ -107,8 +108,8 @@ while len(PLAYERS) > 1:
...
@@ -107,8 +108,8 @@ while len(PLAYERS) > 1:
continue
continue
os
.
system
(
"
clear
"
)
os
.
system
(
"
clear
"
)
print_stack
()
print_stack
()
for
player
in
PLAYERS
:
for
player
_
in
PLAYERS
:
if
len
(
PCARDS
[
player
])
==
1
:
if
len
(
PCARDS
[
player
_
])
==
1
and
player_
!=
player
:
print
(
CLEAR
+
"
{} hat UNO!
"
.
format
(
player
))
print
(
CLEAR
+
"
{} hat UNO!
"
.
format
(
player
))
input
(
CLEAR
+
player
+
"
ist dran. Gib das Handy weiter und drücke Enter
"
)
input
(
CLEAR
+
player
+
"
ist dran. Gib das Handy weiter und drücke Enter
"
)
print
(
"
0) Eine Karte ziehen
"
)
print
(
"
0) Eine Karte ziehen
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment