mirror of
https://github.com/LazoCoder/Pokemon-Terminal
synced 2025-02-17 05:18:31 +00:00
Fixed index out of bounds bug in random function
This commit is contained in:
parent
160fddc46c
commit
44d471826d
4 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
tell application "iTerm"
|
||||
tell current session of current window
|
||||
set background image to "/Users/Laki/GitHub/Pokemon-Terminal/./Images/Generation I - Kanto/133.png"
|
||||
set background image to "/Users/Laki/GitHub/Pokemon-Terminal/./Images/Generation II - Johto/155.png"
|
||||
end tell
|
||||
end tell
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/bash
|
||||
osascript /Users/Laki/GitHub/Pokemon-Terminal/./Scripts/wallpaper.scpt
|
||||
osascript /Users/Laki/GitHub/Pokemon-Terminal/./Scripts/background.scpt
|
|
@ -1,5 +1,5 @@
|
|||
tell application "System Events"
|
||||
tell current desktop
|
||||
set picture to "/Users/Laki/GitHub/Pokemon-Terminal/./Images/Generation I - Kanto/133.png"
|
||||
set picture to "/Users/Laki/GitHub/Pokemon-Terminal/./Images/Generation I - Kanto/025.png"
|
||||
end tell
|
||||
end tell
|
|
@ -110,7 +110,7 @@ class Database:
|
|||
|
||||
def get_random(self):
|
||||
# Select a random Pokemon from the database.
|
||||
random_int = random.randint(0, len(self.__pokemon_list))
|
||||
random_int = random.randint(0, len(self.__pokemon_list) - 1)
|
||||
return self.__pokemon_list[random_int]
|
||||
|
||||
def pokemon_id_exists(self, identifier):
|
||||
|
|
Loading…
Add table
Reference in a new issue