asweigart / asweigart/PythonStdioGames
tsuromapmaker bug
- Lingua principale
- Python
- Stelle
- 971
- Fork
- 216
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
In the code:
# This code uses checksums to make sure the above TILES were typed correctly.
for tile in enumerate(TILES):
assert len(tile) == 26, 'Tile %r has an incorrect length.' % (tile,)
total = 0
for i in range(25):
total += int(tile[i])
assert total % 10 == 0, 'Tile %r is wrong.' % (tile,)
TILES[i] = TILES[i][:25] # Cut off the checksum digit.
the index "i" used in the last line will always have the value 24, resulting in a length assert once it gets to that tile as it will have previously truncated it.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Trova il file sorgente che contiene il ciclo di checksum di TILES mostrato nell’issue e verifica come viene usato enumerate. Verifica il fallimento sulla tile interessata, quindi esegui il gioco pertinente o i controlli disponibili per confermare che ogni tile venga validata senza troncare l’elemento sbagliato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- game-dev
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100