from math import *


def DefFrontEndGameMap(resolution,Orientation):

	if Orientation == "Y":
		SCREEN_W,SCREEN_H=resolution
		SIZE_SNAP_CONVERT_W = int(floor(SCREEN_W / 3))
		SIZE_SNAP_CONVERT_H = int(floor(SCREEN_H / 5))
		SIZE_SNAP_CONVERT=(SIZE_SNAP_CONVERT_W,SIZE_SNAP_CONVERT_H)
		SIZE_WHEEL_CONVERT_W = SIZE_SNAP_CONVERT_W
		SIZE_WHEEL_CONVERT_H = int(floor(SIZE_WHEEL_CONVERT_W / 4))
		SIZE_WHEEL_CONVERT=(SIZE_WHEEL_CONVERT_W,SIZE_WHEEL_CONVERT_H)
		WHERE_WHEEL_X = SIZE_WHEEL_CONVERT_W
		WHERE_WHEEL_Y = int(floor(SCREEN_H / 10))
		WHERE_WHEEL=(WHERE_WHEEL_X,WHERE_WHEEL_Y)
		WHERE_SNAP_X = SIZE_WHEEL_CONVERT_W
		WHERE_SNAP_Y = WHERE_WHEEL_Y + SIZE_WHEEL_CONVERT_H + SEPARATION_WHEEL_SNAP
		WHERE_SNAP=(WHERE_SNAP_X,WHERE_SNAP_Y)
		WHERE_TEXTE_X = WHERE_WHEEL_X
		WHERE_TEXTE_Y = int(floor(SCREEN_H / 2))
		SIZE_TEXTE_W = SIZE_SNAP_CONVERT_W
		SIZE_TEXTE_H = int(floor(SIZE_SNAP_CONVERT_H))
		WHERE_TEXTE=(WHERE_TEXTE_X,WHERE_TEXTE_Y)
		SIZE_TEXTE = (SIZE_TEXTE_W,SIZE_TEXTE_H)
		font_path = "./MEDIA/font.ttf"
		max_carac = 50
		font_path = "./MEDIA/font.ttf"
		max_carac = 30
		font_size=int(round(floor(SIZE_TEXTE_W / max_carac)))

#		font_size = 20


	else:
		SCREEN_W,SCREEN_H=resolution
		UNIT_H=int(floor(SCREEN_H/20))
		UNIT_L=int(floor(SCREEN_W/30))


		######### SNAP ########
		SIZE_SNAP_CONVERT_W = (int(floor((SCREEN_W / 2)-((UNIT_L + UNIT_L/2)))))
		SIZE_SNAP_CONVERT_H = int(floor(SCREEN_H - (UNIT_H*2 + UNIT_H/2 )))
		SIZE_SNAP_CONVERT=(SIZE_SNAP_CONVERT_W,SIZE_SNAP_CONVERT_H)
		WHERE_SNAP_X = int(floor(((SCREEN_W / 2) + (UNIT_L/2))))
		WHERE_SNAP_Y = UNIT_H
		WHERE_SNAP=(WHERE_SNAP_X,WHERE_SNAP_Y)

		######### WHEEL ########
		SIZE_WHEEL_CONVERT_W = SIZE_SNAP_CONVERT_W	
		SIZE_WHEEL_CONVERT_H = int(floor((SCREEN_H /3)-( UNIT_H + UNIT_H/2) ))
		SIZE_WHEEL_CONVERT=(SIZE_WHEEL_CONVERT_W,SIZE_WHEEL_CONVERT_H)
		WHERE_WHEEL_X = UNIT_L 
		WHERE_WHEEL_Y = SIZE_WHEEL_CONVERT_H + (UNIT_H * 2)
		WHERE_WHEEL  = (WHERE_WHEEL_X,WHERE_WHEEL_Y)

		########## SYS #########
		SIZE_SYS_W =  SIZE_WHEEL_CONVERT_W 
		SIZE_SYS_H = SIZE_WHEEL_CONVERT_H
		SIZE_SYS_CONVERT= (SIZE_SYS_W,SIZE_SYS_H)
		WHERE_SYS_X = UNIT_L
		WHERE_SYS_Y = UNIT_H
		WHERE_SYS=(WHERE_SYS_X,WHERE_SYS_Y)

		######### TEXTE ########
		SIZE_TEXTE_W =  SIZE_WHEEL_CONVERT_W 
		SIZE_TEXTE_H = SIZE_WHEEL_CONVERT_H
		SIZE_TEXTE = (SIZE_TEXTE_W,SIZE_TEXTE_H)
		WHERE_TEXTE_X = UNIT_L
		WHERE_TEXTE_Y = (SIZE_WHEEL_CONVERT_H * 2) + (UNIT_H * 3)
		WHERE_TEXTE=(WHERE_TEXTE_X,WHERE_TEXTE_Y)


		
		
		font_path = "./MEDIA/font.ttf"
		max_carac = 54
		max_carac = int(floor((SCREEN_W/10) -( SCREEN_W/10 * 2/3)))
		font_size=int(round(floor((SIZE_TEXTE_W / max_carac))*2))
		#font_size = 35


	return font_path,font_size,max_carac,WHERE_TEXTE,WHERE_TEXTE_X,WHERE_TEXTE_Y,SIZE_TEXTE_W,SIZE_TEXTE_H,SIZE_TEXTE,WHERE_WHEEL,WHERE_SYS,SIZE_WHEEL_CONVERT,WHERE_SNAP,SIZE_SNAP_CONVERT,SIZE_SYS_CONVERT,UNIT_L,UNIT_H
			
