-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Risk-risiko #152
base: main
Are you sure you want to change the base?
Risk-risiko #152
Conversation
…s and implemented function that prints results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correggi gli errori della pipeline. Per il resto mi fido, anche perchè non gioco a risiko da una vita 👀
Non capisco che errori mi stia dando la pipeline, controllando nei check di github vedo solo che genera un'eccezione e dice che tutti i controlli falliscono ma senza darmi nessun motivo del perché |
src/risk-risiko.py
Outdated
print(dices[1], "(M)") | ||
print(dices[2], "(0)") | ||
|
||
def printResults(red, blue): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Un po' di type hinting fa ssempre bene:
def randDice() -> int:
#....
def printDices(dices: list[int]):
#...
Il problema e' questo:
sembra ci sia un accapo di troppo alla riga 30 |
@@ -0,0 +1,29 @@ | |||
import random |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Importa solo la funzione randint dal modulo random.
import random | ||
|
||
def randDice() -> int: | ||
return random.randint(1, 6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definisci sempre i valori costanti in opportune variabili.
MIN_NUMBER=1
MAX_NUMBER= 6
Implementate funzioni per stampare a schermo i dadi dei giocatori e per stampare i vincitori