# Modules
import pygame
pygame.init()

import os

CURRENT_VERSION = "0.1"

SCREEN_WIDTH = 640
SCREEN_HEIGHT = 480
FPS = 50
COLORDEPTH = 32

TILE_SIZE = 8

WHITE = ( 255, 255, 255 )
GREEN = ( 0, 200, 0 )
BLACK = ( 0, 0, 0 )
DARK_GREEN = ( 100, 255, 125 )
YELLOW = ( 255, 255, 0 )
RED = ( 230, 0, 0 )
GREY1 = ( 50, 50, 50 )
BLACK2 = ( 10, 10, 10 )
BLUE = ( 50, 70, 255 )
LIGHT_BLUE = ( 30, 50, 110 )
DARK_BLUE = ( 20, 40, 100 )
BROWN = ( 200, 200, 50 )
DARK_WHITE = ( 210, 210, 210 )

# The different sounds.
BUTTON_MOUSE_OVER_SOUND = "mouse_over_button.ogg"
SNACK_COLLECTED_SOUND = "snack_collected.ogg"
CLOCK_TICK_SOUND = "clock_tick.ogg"
BUTTON_MOUSE_CLICK_SOUND = "button_click.ogg"

TITLE = "CATERPILLAR CATALIN AND HER FRIENDS"
# Settings for the countdown timer.
GAMESTART_COUNTDOWN_TIMER_SETTINGS = {
	"seconds": 3,
	"fps": FPS,
	"text": "",
	"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2 ),
	"size": 80,
	"no_formatting": True,
	"clock_tick_sound": CLOCK_TICK_SOUND	
}
# Settings for the in-game timer.
COUNTDOWN_TIMER_SETTINGS = {
	"seconds":90,
	"fps":FPS,
	"text":"",
	"size": 30,
	"centerxy": ( SCREEN_WIDTH / 6, SCREEN_HEIGHT / 8 ),
}
# Controls for player 1.
CTRL_P1 = {
	"turn_left": pygame.K_LEFT,
	"turn_right": pygame.K_RIGHT
}

# Controls for player 2.
CTRL_P2 = {
	"turn_left": pygame.K_z,
	"turn_right": pygame.K_x
}

# Controls for player 3.
CTRL_P3 = {
	"turn_left": pygame.K_n,
	"turn_right": pygame.K_m
}

# Controls for player 4.
CTRL_P4 = {
	"turn_left": pygame.K_KP1,
	"turn_right": pygame.K_KP3
}


# Caterpillars data
CATERPILLAR_LENGTH = 2

cati_data = {
	"color": GREEN,
	"n_tiles": CATERPILLAR_LENGTH,
	"size": TILE_SIZE,
	"top": ( SCREEN_WIDTH / 2 ) - TILE_SIZE * 4,
	"left": SCREEN_HEIGHT / 2,
	"controls": CTRL_P1,
	"snack_collected_sound":SNACK_COLLECTED_SOUND
}
jackie_data = {
	"color": YELLOW,
	"n_tiles": CATERPILLAR_LENGTH,
	"size": TILE_SIZE,
	"top": ( SCREEN_WIDTH / 2 ) - TILE_SIZE * 2,
	"left": SCREEN_HEIGHT / 2,
	"controls": CTRL_P2,
	"snack_collected_sound":SNACK_COLLECTED_SOUND	
}
meli_data = {
	"color": BLUE,
	"n_tiles": CATERPILLAR_LENGTH,
	"size": TILE_SIZE,
	"top": ( SCREEN_WIDTH / 2 ) + TILE_SIZE * 2,
	"left": SCREEN_HEIGHT / 2,
	"controls": CTRL_P3,
	"snack_collected_sound":SNACK_COLLECTED_SOUND	
}
gerald_data = {
	"color": RED,
	"n_tiles": CATERPILLAR_LENGTH,
	"size": TILE_SIZE,
	"top": ( SCREEN_WIDTH / 2 ) + TILE_SIZE * 4,
	"left": SCREEN_HEIGHT / 2,
	"controls": CTRL_P4,
	"snack_collected_sound":SNACK_COLLECTED_SOUND	
}

# VARIABLE PERFERENCES
VAR_OPTS_FILENAME = os.path.join( "game", "options.txt" )

DEFAULT_OPTIONS = {
	"btn_n_caterpillars": 1,
	"music": "YES",
	"sounds": "YES",
	"btn_theme_mode": "ICESCAPE",
	"name": "Unknown"
}

# MENUES
# Main menu - Contains information on what will be displayed in the main menu and how.
MAIN_MENU = {
	# Labels
	"labels":
	{
		"caption": {
			"text": TITLE,
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 8 - 20 ),
			"size": 30
		},
		"version": {
			"text": "VERSION: " + CURRENT_VERSION,
			"centerxy": ( SCREEN_WIDTH / 8, ( SCREEN_HEIGHT / 8 ) * 7 ),
			"size": 12
		},
		"name_greeting": {
			"text": "HELLO THERE, ",
			"centerxy": ( SCREEN_WIDTH / 2, ( SCREEN_HEIGHT / 5 ) - 20  ),
			"size": 14
		}
	},
	"buttons":
	{
		"btn_name":
		{
			"ret_value": "name_change",
			"text_inactive": "NONAME",
			"unique_name":"btn_name",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 5 ),
			"size": 14,
			"color_active": RED,
			"bold_active": True,
			"italic_inactive": True,
			"bold_inactive": True,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 0
		},
		"btn_start_game":
		{
			"ret_value": "start_game",
			"text_inactive": "START GAME",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 20 ),
			"size": 20,
			"color_active": RED,
			"bold_active": False,
			"italic_active": False,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 1
		},
		"btn_show_instructions":
		{
			"ret_value": "show_instructions",
			"text_inactive": "INSTRUCTIONS",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 50 ),
			"unique_name": "btn_instructions",
			"size": 20,
			"color_active": RED,
			"bold_active": False,
			"italic_active": False,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 2
		},
		"btn_show_options":
		{
			"ret_value": "show_options",
			"text_inactive": "OPTIONS",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 80 ),
			"unique_name": "btn_options",
			"size": 20,
			"color_active": RED,
			"bold_active": False,
			"italic_active": False,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 3
		},
		"btn_show_highscores":
		{
			"ret_value": "show_highscores",
			"text_inactive": "HIGHSCORES",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 110 ),
			"unique_name": "btn_show_highscores",
			"size": 20,
			"color_active": RED,
			"bold_active": False,
			"italic_active": False,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 4
		},
		"btn_exit_game":
		{
			"ret_value": "exit_game",
			"text_inactive": "EXIT GAME",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 140 ),
			"size": 20,
			"color_active": RED,
			"bold_active": False,
			"italic_active": False,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 5
		}
	}
}

BG_IMAGE_FILENAME = "title_screen_image.png"

# Options menu
OPTIONS_MENU = {
	"labels":
	{
		"caption":
		{
			"text": TITLE,
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 8 - 20 ),
			"size": 30
		},
		"caption_option":
		{
			"text": "OPTIONS",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 20 ),
			"size": 20
		},		
		"lbl_caterpillars":
		{
			"text": "NUMBER OF CATERPILLARS:",
			"centerxy": ( SCREEN_WIDTH / 4, SCREEN_HEIGHT / 4 + 60 )
		},
		"lbl_music_enabled":
		{
			"text": "MUSIC ENABLED:",
			"centerxy": ( SCREEN_WIDTH / 4, SCREEN_HEIGHT / 4 + 90 )
		},
		"lbl_sounds_enabled":
		{
			"text": "SOUNDS ENABLED:",
			"centerxy": ( SCREEN_WIDTH / 4, SCREEN_HEIGHT / 4 + 120 )
		},
		"lbl_theme_mode":
		{
			"text": "THEME:",
			"centerxy": ( SCREEN_WIDTH / 4, SCREEN_HEIGHT / 4 + 150 )		
		}
	},
	"option_buttons":
	{
		"btn_n_caterpillars":
		{
			"button_texts": ( "1", "2", "3", "4" ),
			"ret_value": "music_enabled",
			"text_inactive": "YES",
			"unique_name": "btn_n_caterpillars",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 60 ),
			"color_active": RED,
			"bold_active": False,
			"italic_active": False,
			"is_option":True,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 0
		},
		"btn_music_enabled":
		{
			"button_texts": ( "YES", "NO" ),
			"ret_value": "music_enabled",
			"text_inactive": "YES",
			"unique_name": "music",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 90 ),
			"color_active": RED,
			"bold_active": False,
			"italic_active": False,
			"is_option":True,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 1			
		},
		"btn_sounds_enabled":
		{
			"button_texts": ( "YES", "NO" ),
			"ret_value": "sounds_enabled",
			"unique_name": "sounds",
			"text_inactive": "YES",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 120 ),
			"color_active": RED,
			"bold_active": False,
			"italic_active": False,
			"is_option":True,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 2			
		},	
		"btn_theme_mode":
		{
			"button_texts": ( "JUNGLE", "ICESCAPE" ),
			"ret_value": "theme",
			"text_inactive": "JUNGLE",
			"unique_name": "btn_theme_mode",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 150 ),
			"color_active": RED,
			"bold_active": False,
			"italic_active": False,
			"is_option":True,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 3			
		},
		"btn_back":
		{
			"button_texts": ( "BACK", ),
			"ret_value": "btn_back",
			"text_inactive": "BACK",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 180 ),
			"color_active": RED,
			"bold_active": False,
			"italic_active": False,
			"is_option": False,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 4
		}			
	}
}
OPTION_SCREEN_IMAGE = "option_screen_image.png"

# Change name menu
CHANGE_NAME_MENU = {
	"labels":
	{
		"caption":
		{
			"text": TITLE,
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 8 - 20 ),
			"size": 30
		},
		"lbl_change_name_info":
		{
			"text": "USE THE KEYBOARD TO CHANGE YOUR NAME",
			"unique_name": "lbl_change_name_info",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 20 ),
			"size": 20
		},
		"lbl_change_name":
		{
			"text": "NONAME",
			"unique_name": "lbl_change_name",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 50 ),
			"size": 30
		}
	},
	"buttons":
	{
		"btn_back":
		{
			"ret_value": "btn_back",
			"text_inactive": "BACK",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 120 ),
			"color_active": RED,
			"bold_active": False,
			"italic_active": False,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 0
		}
	}
}

# Highscore table data.
HIGHSCORE_TABLE_MENU = {
	"labels":
	{
		"lbl_caption":
		{
			"text": TITLE,
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 8 - 20 ),
			"size": 30
		},
		"lbl_highscore_caption":
		{
			"text": "",
			"unique_name": "lbl_highscore_caption",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 - 20 ),
			"size": 20
		}			
	},
	"buttons":
	{
		"btn_back":
		{
			"ret_value": "btn_back",
			"text_inactive": "BACK",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 330 ),
			"bold_active": False,
			"italic_active": False,
			"color_active": RED,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 0
		}
	}	
}
# Highscore menu data.
HIGHSCORE_MENU = {
	"labels":
	{
		"lbl_caption":
		{
			"text": TITLE,
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 8 - 20 ),
			"size": 30
		},
		"lbl_highscore_caption":
		{
			"text": "HIGHSCORE MENU",
			"unique_name": "lbl_highscore_menu_caption",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 20 ),
			"size": 20
		}
	},
	"buttons":
	{
		"btn_highscore_one_player":
		{
			"ret_value": "btn_highscore_one_player",
			"text_inactive": "1 PLAYER HIGHSCORE TABLE",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 70 ),
			"bold_active": False,
			"italic_active": False,
			"color_active": RED,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 0
		},
		"btn_highscore_two_players":
		{
			"ret_value": "btn_highscore_two_players",
			"text_inactive": "2 PLAYERS HIGHSCORE TABLE",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 100 ),
			"bold_active": False,
			"italic_active": False,
			"color_active": RED,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 1			
		},
		"btn_highscore_three_players":
		{
			"ret_value": "btn_highscore_three_players",
			"text_inactive": "3 PLAYERS HIGHSCORE TABLE",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 130 ),
			"bold_active": False,
			"italic_active": False,
			"color_active": RED,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 2
		},
		"btn_highscore_four_players":
		{
			"ret_value": "btn_highscore_four_players",
			"text_inactive": "4 PLAYERS HIGHSCORE TABLE",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 160 ),
			"bold_active": False,
			"italic_active": False,
			"color_active": RED,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 3			
		},
		"btn_back":
		{
			"ret_value": "btn_back",
			"text_inactive": "BACK",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 200 ),
			"bold_active": False,
			"italic_active": False,
			"color_active": RED,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 4
		}
	}
}


# Data for the game-over screen / menu.
GAME_OVER_MENU = {
	"labels":
	{
		"lbl_caption":
		{
			"text": "GAME OVER!",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 8 - 20 ),
			"size": 30		
		},
		"lbl_your_score":
		{
			"text": "YOUR SCORE:",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 ),
			"size": 20
		},
		"lbl_the_score":
		{
			"unique_name": "lbl_the_score",
			"text": "",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 60 ),
			"size": 60
		}
	},
	"buttons":
	{
		"btn_back":
		{
			"ret_value": "btn_back",
			"text_inactive": "BACK",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 160 ),
			"bold_active": False,
			"italic_active": False,
			"color_active": RED,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 0
		}
	}
}

# Data for the in-game quit / pause menu.
INGAME_PAUSE_MENU = {
	"labels":
	{
		"lbl_caption":
		{
			"text": TITLE,
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 8 - 20 ),
			"size": 30
		},
		"lbl_pause":
		{
			"text": "PAUSE",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 ),
			"size": 25
		},		
		"lbl_ask_to_quit":
		{
			"text": "WOULD YOU REALLY LIKE TO ABORT THE CURRENT GAME?",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 40 ),
			"size": 20
		}
	},
	"buttons":
	{
		"btn_yes":
		{
			"ret_value": "btn_yes",
			"text_inactive": "YES",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 100 ),
			"bold_active": False,
			"italic_active": False,
			"color_active": RED,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 0
		},
		"btn_no":
		{
			"ret_value": "btn_no",
			"text_inactive": "NO",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 130 ),
			"bold_active": False,
			"italic_active": False,
			"color_active": RED,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 1
		}
	}
}

# Instructions menu
INSTRUCTIONS_MENU = {
	"labels":
	{
		"lbl_caption":
		{
			"text": TITLE,
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 8 - 20 ),
			"size": 30
		},
		"lbl_ask_to_quit":
		{
			"text": "INSTRUCTIONS",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 ),
			"size": 20
		},
		"lbl_hint1":
		{
			"text": "COLLECT AS MANY SNACKS (RED SQUARES) AS POSSIBLE.",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 40 ),
			"size": 20
		},
		"lbl_hint2":
		{
			"text": "DO NOT COLLIDE WITH YOURSELF OR OTHER CATERPILLARS.",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 60 ),
			"size": 20
		},
		"lbl_hint3":
		{
			"text": "MULTIPLAYER: YOU ARE FRIENDS WITH EACH OTHER. PLAY WISE.",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 80 ),
			"size": 20
		},
		"lbl_hint4":
		{
			"text": "CONTROLS PLAYER 1 (GREEN): left arrow; right arrow.",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 120 ),
			"size": 20
		},
		"lbl_hint5":
		{
			"text": "CONTROLS PLAYER 2 (YELLOW): y/z; x.",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 140 ),
			"size": 20
		},
		"lbl_hint6":
		{
			"text": "CONTROLS PLAYER 3 (BLUE): n; m.",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 160 ),
			"size": 20
		},
		"lbl_hint7":
		{
			"text": "CONTROLS PLAYER 4 (RED): 1(NUMPAD); 3(NUMPAD).",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 180 ),
			"size": 20
		}											
	},
	"buttons":
	{
		"btn_back":
		{
			"ret_value": "btn_back",
			"text_inactive": "BACK",
			"centerxy": ( SCREEN_WIDTH / 2, SCREEN_HEIGHT / 4 + 300 ),
			"bold_active": False,
			"italic_active": False,
			"color_active": RED,
			"mouse_over_sound":BUTTON_MOUSE_OVER_SOUND,
			"mouse_click_sound": BUTTON_MOUSE_CLICK_SOUND,
			"unique_id": 0
		}
	}
}


# SNACKS
SNACK_TIMER_START = 0
SNACK_TIMER = 60
SNACK_TIMER_INTERVAL = 1

# Score
SCORE_FACTOR = 10

# Preferences directory.
PREFERENCES_DIRECTORY = "preferences"

# Highscore data preferences.
HIGHSCORE_DIRECTORY = "highscores"

DEFAULT_HIGHSCORE_TABLES = {
	1: { # 1 player
		"filename": os.path.join( "game", "highscore_table_1_player.txt" ),
		"data": [
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ]
		]
	},
	2: { # 2 players
		"filename": os.path.join( "game", "highscore_table_2_players.txt" ),
		"data": [
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ]
		]
	},
	3: { # 3 players
		"filename": os.path.join( "game", "highscore_table_3_players.txt" ),
		"data": [
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ]
		]
	},
	4: { # 4 players
		"filename": os.path.join( "game", "highscore_table_4_players.txt" ),
		"data": [
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ],
			[ "Unknown", 0 ]
		]
	}
}

# The directory where the images are stored.
IMAGES_DIR = os.path.join( "game", "data", "images" )

# The directory where the music is stored.
MUSIC_DIR = os.path.join( "game", "data", "music" )

# Name of the music tracks.
MUSIC_TRACK_1 = "Three_Apples.mp3"

# A list of records.
RECORDS = ( "soundtrack.mp3", )


# Sounds.
SOUNDS_DIR = os.path.join( "game", "data", "sounds" )

# The directory where fonts reside:
FONT_DIR = os.path.join( "game", "data", "fonts" )

# The channel object is global.
# Create a channel to play sounds on.
if pygame.mixer.get_num_channels() > 0:
	selected_channel = 1
	sound_channel = pygame.mixer.Channel( selected_channel )
else:
	raise pygame.error( "You need a soundcard to play this game." )
