Fixed index out of bounds bug in random function

This commit is contained in:
LazoCoder 2017-04-30 21:58:43 -04:00
parent 160fddc46c
commit 44d471826d
4 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -1,2 +1,2 @@
#!/bin/bash
osascript /Users/Laki/GitHub/Pokemon-Terminal/./Scripts/wallpaper.scpt
osascript /Users/Laki/GitHub/Pokemon-Terminal/./Scripts/background.scpt

View file

@ -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

View file

@ -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):