Skip to content

Commit b073d2b

Browse files
committed
Added AI_animal_game and deleted the morse code
1 parent 511f769 commit b073d2b

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Diff for: Game-Galore/AI_Guess_Animal.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import json
2+
import os
23

34
class AnimalGame:
45
def __init__(self):
56
# Load animal data from a JSON file or create a default one if it doesn't exist
6-
self.data_file = 'animals.json'
7+
self.folder_name = 'Game-Galore'
8+
self.data_file = os.path.join(self.folder_name, 'animals.json')
79
self.animals = self.load_data()
810

911
def load_data(self):

Diff for: Game-Galore/animals.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"questions": {"mammal": "his hairs"}, "animals": ["dog", "cat", "elephant", "tiger", "lion", "rabbit", "fish", "tiger"]}

Diff for: animals.json

-1
This file was deleted.

0 commit comments

Comments
 (0)